Alloca

Alloca functions.

Result

aligned memory allocation result

Aligned memory allocation result

MEMBERS

dmMemory::RESULT_OK - 0

dmMemory::RESULT_INVAL - -1

dmMemory::RESULT_NOMEM - -2


AlignedMalloc(memptr, alignment, size)

Allocate size bytes of uninitialized storage whose...

Allocate size bytes of uninitialized storage whose alignment is specified by alignment.

PARAMETERS

memptr - Pointer to a void* where the allocated pointer address should be stored.

alignment - The alignment value, which must be an integer power of 2.

size - Size of the requested memory allocation.

RETURN

result - Returns RESULT_OK on success, RESULT_INVAL if alignment is not a power of 2 and RESULT_NOMEM if out of memory.


AlignedFree(memptr)

Frees a block of memory that was allocated with dm...

Frees a block of memory that was allocated with dmMemory::AlignedMalloc

PARAMETERS

memptr - A pointer to the memory block that was returned by dmMemory::AlignedMalloc