Check properties of top chunk
| 1727 | |
| 1728 | // Check properties of top chunk |
| 1729 | void malloc_state::do_check_top_chunk(mchunkptr p) const |
| 1730 | { |
| 1731 | msegmentptr sp = segment_holding((char*)p); |
| 1732 | size_t sz = p->_head & ~INUSE_BITS; // third-lowest bit can be set! |
| 1733 | assert(sp != 0); |
| 1734 | assert((spp_is_aligned(chunk2mem(p))) || (p->_head == FENCEPOST_HEAD)); |
| 1735 | assert(ok_address(p)); |
| 1736 | assert(sz == _topsize); |
| 1737 | assert(sz > 0); |
| 1738 | assert(sz == ((sp->_base + sp->_size) - (char*)p) - top_foot_size()); |
| 1739 | assert(p->pinuse()); |
| 1740 | assert(!p->chunk_plus_offset(sz)->pinuse()); |
| 1741 | } |
| 1742 | |
| 1743 | // Check properties of (inuse) mmapped chunks |
| 1744 | void malloc_state::do_check_mmapped_chunk(mchunkptr p) const |
nothing calls this directly
no test coverage detected