Debug dynamic memory.
More...
#include <base/mem/DebugDynamicMemory.h>
|
static void * | allocate (MemorySize size) noexcept |
|
static void | release (void *memory) |
|
Debug dynamic memory.
This class provides support for dynamic memory allocation/deallocation with debug support. This class should not be used in final application releases due to the added memory and processing requirements.
- See also
- DynamicMemory
- Version
- 1.0
◆ allocate()
static void* DebugDynamicMemory::allocate |
( |
MemorySize |
size | ) |
|
|
staticnoexcept |
Allocates the specified number of bytes on the heap. The behavior is unspecified if the desired size is 0.
- Parameters
-
size | The desired size of the memory block in number of bytes. |
- Returns
- 0 if not successful.
◆ release()
static void DebugDynamicMemory::release |
( |
void * |
memory | ) |
|
|
static |
Frees the specified memory block previously allocated by allocate(). Does nothing if the pointer is 0.
- Parameters
-
◆ PREFIX_WORDS
const unsigned int DebugDynamicMemory::PREFIX_WORDS = 128 |
|
static |
Specifies the size of the prefix region.
◆ SUFFIX_WORDS
const unsigned int DebugDynamicMemory::SUFFIX_WORDS = 128 |
|
static |
Specifies the size of the suffix region.