MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / do_check_inuse_chunk

Function do_check_inuse_chunk

dlmalloc/dlmalloc.c:2636–2644  ·  view source on GitHub ↗

Check properties of inuse chunks */

Source from the content-addressed store, hash-verified

2634
2635/* Check properties of inuse chunks */
2636static void do_check_inuse_chunk(mstate m, mchunkptr p) {
2637 do_check_any_chunk(m, p);
2638 assert(cinuse(p));
2639 assert(next_pinuse(p));
2640 /* If not pinuse and not mmapped, previous chunk has OK offset */
2641 assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p);
2642 if (is_mmapped(p))
2643 do_check_mmapped_chunk(m, p);
2644}
2645
2646/* Check properties of free chunks */
2647static void do_check_free_chunk(mstate m, mchunkptr p) {

Callers 3

do_check_malloced_chunkFunction · 0.85
do_check_smallbinFunction · 0.85
traverse_and_checkFunction · 0.85

Calls 2

do_check_any_chunkFunction · 0.85
do_check_mmapped_chunkFunction · 0.85

Tested by

no test coverage detected