Inspect the heap at runtime. More...
| Data Structures | |
| struct | mi_heap_area_t | 
| An area of heap space contains blocks of a single size.  More... | |
| Typedefs | |
| typedef bool() | mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg) | 
| Visitor function passed to mi_heap_visit_blocks()  More... | |
| Functions | |
| bool | mi_heap_contains_block (mi_heap_t *heap, const void *p) | 
| Does a heap contain a pointer to a previously allocated block?  More... | |
| bool | mi_heap_check_owned (mi_heap_t *heap, const void *p) | 
| Check safely if any pointer is part of a heap.  More... | |
| bool | mi_check_owned (const void *p) | 
| Check safely if any pointer is part of the default heap of this thread.  More... | |
| bool | mi_heap_visit_blocks (const mi_heap_t *heap, bool visit_all_blocks, mi_block_visit_fun *visitor, void *arg) | 
| Visit all areas and blocks in a heap.  More... | |
Inspect the heap at runtime.
| struct mi_heap_area_t | 
An area of heap space contains blocks of a single size.
The bytes in freed blocks are committed - used. 
| typedef bool() mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg) | 
Visitor function passed to mi_heap_visit_blocks()
This function is always first called for every area with block as a NULL pointer. If visit_all_blocks was true, the function is then called for every allocated block in that area.
| bool mi_check_owned | ( | const void * | p | ) | 
Check safely if any pointer is part of the default heap of this thread.
| p | Any pointer – not required to be previously allocated by us. | 
Note: expensive function, linear in the pages in the heap.
| bool mi_heap_check_owned | ( | mi_heap_t * | heap, | 
| const void * | p | ||
| ) | 
Check safely if any pointer is part of a heap.
| heap | The heap. | 
| p | Any pointer – not required to be previously allocated by us. | 
Note: expensive function, linear in the pages in the heap.
| bool mi_heap_contains_block | ( | mi_heap_t * | heap, | 
| const void * | p | ||
| ) | 
Does a heap contain a pointer to a previously allocated block?
| heap | The heap. | 
| p | Pointer to a previously allocated block (in any heap)– cannot be some random pointer! | 
| bool mi_heap_visit_blocks | ( | const mi_heap_t * | heap, | 
| bool | visit_all_blocks, | ||
| mi_block_visit_fun * | visitor, | ||
| void * | arg | ||
| ) | 
Visit all areas and blocks in a heap.
| heap | The heap to visit. | 
| visit_all_blocks | If true visits all allocated blocks, otherwise visitor is only called for every heap area. | 
| visitor | This function is called for every area in the heap (with block as NULL). If visit_all_blocks is true, visitor is also called for every allocated block in every area (with block!=NULL). return false from this function to stop visiting early. | 
| arg | Extra argument passed to visitor. |