Centralized functions to allocate, reallocate and deallocate memory. More...
#include <Memory.h>
Static Public Member Functions | |
| static void * | allocate (size_t numBytes, size_t alignment) |
| Allocates numBytes bytes of memory. | |
| static void * | reallocate (void *memory, size_t numBytes) |
| Change size of already allocated memory block. | |
| static void | release (void *memory) |
| Free memory allocated by Memory::allocate and / or reallocated by Memory::reallocate. | |
Centralized functions to allocate, reallocate and deallocate memory.
Allocates numBytes bytes of memory.
| numBytes | Number of bytes to allocate |
| alignment | Alignment of the returned memory |
|
static |
Change size of already allocated memory block.
Existing contents of input buffer will be copied over.
| memory | pointer to memory previously allocated by Memory::allocate or Memory::Reallocate |
| numBytes | new size of the reallocated block |
|
static |
Free memory allocated by Memory::allocate and / or reallocated by Memory::reallocate.
| memory | Memory to release / deallocate |