Base Framework
Classes | Static Public Member Functions | Static Public Attributes | List of all members
DebugDynamicMemory Class Reference

Debug dynamic memory. More...

#include <base/mem/DebugDynamicMemory.h>

Static Public Member Functions

static void * allocate (MemorySize size) noexcept
 
static void release (void *memory)
 

Static Public Attributes

static const unsigned int PREFIX_WORDS = 128
 
static const unsigned int SUFFIX_WORDS = 128
 

Detailed Description

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

Member Function Documentation

◆ 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
sizeThe 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
memoryThe memory block.

Member Data Documentation

◆ 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.