Getting pointer information

You can use the following to obtain information about the pointer:

find_malloc_ptr()
void* find_malloc_ptr ( const void* ptr,
                        arena_range_t* range );
    

This function finds information about the heap buffer containing the given C pointer, including the type of allocation structure it's contained in and the pointer to the header structure for the buffer. The function returns a pointer to the Dhead structure associated with this particular heap buffer. You can use the returned pointer with the DH_*() macros to obtain more information about the heap buffer. If the pointer doesn't point into the range of a valid heap buffer, the function returns NULL.