Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

Memory Allocation Debug Support


Related

group  Memory Allocation Debug Support: Introduction
group  Overview Of Allocated Memory
group  De-Allocation Pointer Validation
group  Overflow/Underflow Protection (Red Zones)
group  Memory Allocation Markers: Memory Leak Checking
group  Finding (Information About) Memory Allocations
group  Allocation Annotation

Functions

bool libcwd::test_delete (void const *ptr)
 Test if a pointer points to the start of an allocated memory block.
size_t libcwd::mem_size (void)
 Returns the total number of allocated bytes.
unsigned long libcwd::mem_blocks (void)
 Returns the total number of allocated memory blocks.

Function Documentation

bool libcwd::test_delete void const *  ptr  ) 
 

Test if a pointer points to the start of an allocated memory block.

Returns:
true when ptr does not point to the start of an allocated memory block.  No checks are performed on the type of allocator that was used: that is done when the memory block is actually deleted, see De-Allocation Pointer Validation.
Unlike find_alloc, test_delete also works for invisible memory blocks.

Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.