Check properties of malloced chunks at the point they are malloced */
| 2668 | |
| 2669 | /* Check properties of malloced chunks at the point they are malloced */ |
| 2670 | static void do_check_malloced_chunk(mstate m, void* mem, size_t s) { |
| 2671 | if (mem != 0) { |
| 2672 | mchunkptr p = mem2chunk(mem); |
| 2673 | size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); |
| 2674 | do_check_inuse_chunk(m, p); |
| 2675 | assert((sz & CHUNK_ALIGN_MASK) == 0); |
| 2676 | assert(sz >= MIN_CHUNK_SIZE); |
| 2677 | assert(sz >= s); |
| 2678 | /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ |
| 2679 | assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); |
| 2680 | } |
| 2681 | } |
| 2682 | |
| 2683 | /* Check a tree and its subtrees. */ |
| 2684 | static void do_check_tree(mstate m, tchunkptr t) { |
nothing calls this directly
no test coverage detected