class MemoryAllocator

Memory allocator providing a generic implementation.

Specialize for specific categories as needed.

Public

Methods

staticAllocate

static void *Allocate(size_t bytes)

Allocates bytes.

staticAllocateAligned

static void *AllocateAligned(size_t bytes, size_t alignment)

Allocates and aligns them to the specified boundary (in bytes).

If the aligment is less or equal to 16 it is more efficient to use the allocateAligned16() alternative of this method. Alignment must be power of two.

staticAllocateAligned16

static void *AllocateAligned16(size_t bytes)

Allocates and aligns them to a 16 byte boundary.

staticFree

static void Free(void *ptr)

Frees the memory at the specified location.

staticFreeAligned

static void FreeAligned(void *ptr)

Frees memory allocated with allocateAligned()

staticFreeAligned16

static void FreeAligned16(void *ptr)

Frees memory allocated with allocateAligned16()

staticAllocate

static void *Allocate(size_t bytes)

staticFree

static void Free(void *ptr)

staticAllocate

static void *Allocate(size_t bytes)

Allocates bytes.

staticAllocateAligned

static void *AllocateAligned(size_t bytes, size_t alignment)

Allocates and aligns them to the specified boundary (in bytes).

If the aligment is less or equal to 16 it is more efficient to use the allocateAligned16() alternative of this method. Alignment must be power of two.

staticAllocateAligned16

static void *AllocateAligned16(size_t bytes)

Allocates and aligns them to a 16 byte boundary.

staticFree

static void Free(void *ptr)

Frees the memory at the specified location.

staticFreeAligned

static void FreeAligned(void *ptr)

Frees memory allocated with allocateAligned()

staticFreeAligned16

static void FreeAligned16(void *ptr)

Frees memory allocated with allocateAligned16()

staticAllocate

static void *Allocate(size_t bytes)

Allocates the given number of bytes.

staticFree

static void Free(void *ptr)

Frees memory previously allocated with allocate().