Skip to main content

mi_heap_check_owned

Function mi_heap_check_owned 

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

Check safely if any pointer is part of a heap.

p may be any pointer – not required to be previously allocated by the given heap or any other mimalloc heap. Returns true if p points to a block in the given heap, false otherwise.

Note: expensive function, linear in the pages in the heap.

Note: not available when using the v3 feature (removed in mimalloc v3.2).