[][src]Function libmimalloc_sys::mi_heap_check_owned

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

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.

See mi_heap_contains_block, mi_heap_get_default