MemoryHeap::Alloc

MemoryHeap::Alloc
virtual void* Alloc(UPInt size, const AllocInfo* info = 0) = 0;
virtual void* Alloc(UPInt size, UPInt align, const AllocInfo* info = 0) = 0;
Description

Alloc allocates memory block. If size is 0, Alloc will allocate a tiny block and return a valid pointer. Aligned memory allocations are made by passing a value of power of two for the align parameter.

Parameters
Parameters 
Description 
UPInt size 
Size of the memory block to allocate. 
const AllocInfo* info = 0 
Debug information optionally stored with every allocation. 
UPInt align 
A value of zero or power of two for custom memory alignments. 
Return Value

Pointer to the newly allocated memory or null if no space is available.