SysAlloc

SysAlloc
Scaleform::SysAllocBase
    Scaleform::SysAlloc
Declaration
class SysAlloc : public SysAllocBase;
Description

SysAlloc defines a memory allocation interface that developers can override to provide memory for GFx; an instance of this class is typically created on application startup and passed into Scaleform::System or GFx::System constructor. 

SysAlloc is more memory efficient when delegating to malloc/dlmalloc based implementation, as it doesn't require large alignment and will return more memory blocks to the application once content is unloaded. 

Users implementing this interface must provide three functions: Alloc, Free, and Realloc. Implementations of these functions must honor the requested alignment. Although arbitrary alignment requests are possible, requested alignment will typically be small, such as 16 bytes or less. 

SysAlloc links to the MemoryHeapMH implementation, which groups small allocations into 4K-sized blocks belonging to the heap. Allocations larger than 512 bytes will delegated directly to SysAlloc and released immediately once no longer used, making more memory available to the application.

Methods
Method 
Description 
Allocates a large block of memory of specified size to the heap. 
Free 
Frees the block of memory allocated by Alloc or Realloc
Reallocates a memory block allocated by Alloc to a new size. 
SysAlloc constructor. 
File

SF_SysAlloc.h