Check properties of malloced chunks at the point they are malloced */
| 3280 | |
| 3281 | /* Check properties of malloced chunks at the point they are malloced */ |
| 3282 | static void do_check_malloced_chunk(mstate m, void* mem, size_t s) { |
| 3283 | if (mem != 0) { |
| 3284 | mchunkptr p = mem2chunk(mem); |
| 3285 | size_t sz = p->head & ~INUSE_BITS; |
| 3286 | do_check_inuse_chunk(m, p); |
| 3287 | assert((sz & CHUNK_ALIGN_MASK) == 0); |
| 3288 | assert(sz >= MIN_CHUNK_SIZE); |
| 3289 | assert(sz >= s); |
| 3290 | /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ |
| 3291 | assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); |
| 3292 | } |
| 3293 | } |
| 3294 | |
| 3295 | /* Check a tree and its subtrees. */ |
| 3296 | static void do_check_tree(mstate m, tchunkptr t) { |
nothing calls this directly
no test coverage detected