Skip to main content

mi_heap_contains_block

Function mi_heap_contains_block 

Source
pub unsafe extern "C" fn mi_heap_contains_block(
    heap: *mut mi_heap_t,
    p: *const c_void,
) -> bool
Expand description

Does a heap contain a pointer to a previously allocated block?

p must be a pointer to a previously allocated block (in any heap) – it cannot be some random pointer!

Returns true if the block pointed to by p is in the heap.

Note: not available when using the v3 feature (removed in mimalloc v3.2; use mi_heap_contains from the C API directly if needed).