libcwd: The C++ Debugging Support Library - Reference Manual
Author: Carlo Wood
Description: C++ debugging support library with ostream debug output
Keywords: libcwd, debug output, debug facility, debug channel, object orientation, OO, C++, nested debug output, ostream, memory allocation, debugging, source file and line number

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

# Memory Allocation Debug Support

Collaboration diagram for Memory Allocation Debug Support:

## Related
| Memory Allocation Debug Support: Introduction
| Overview Of Allocated Memory
| De-Allocation Pointer Validation
| Overflow/Underflow Protection (Red Zones)
| Memory Allocation Markers: Memory Leak Checking
| Finding (Information About) Memory Allocations
## Functions
bool | libcwd::test_delete (void const *void_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.

## Detailed Description

## Function Documentation

bool libcwd::test_delete | ( | void const * | void_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.