iai_callgrind::client_requests::valgrind::MempoolFlags

Constant METAPOOL

source
pub const METAPOOL: u8 = 2;
Available on crate feature client_requests_defs only.
Expand description

The flag super::MempoolFlags::METAPOOL specifies that the pieces of memory associated with the pool using super::mempool_alloc will be used by the application as superblocks to dole out super::malloclike_block blocks using super::malloclike_block.

In other words, a meta pool is a “2 levels” pool : first level is the blocks described by super::mempool_alloc The second level blocks are described using super::malloclike_block. Note that the association between the pool and the second level blocks is implicit : second level blocks will be located inside first level blocks. It is necessary to use the METAPOOL flag for such 2 levels pools, as otherwise valgrind will detect overlapping memory blocks, and will abort execution (e.g. during leak search).