stMemoryAlloc function
Declaration:
PVOID stMemoryAlloc(
  PVOID MemoryPool,
  SIZE Size
);
Parameters:
MemoryPool

Address of the memory pool.

Size

Size of the memory block to be allocated.

Return value:

Pointer to newly allocated memory block or NULL on failure. To get extended information about failure use stGetLastError function.

Description:

Function allocates a memory block with determined size, in the specified memory pool. Allocated addresses are always aligned to value specified in AR_MEMORY_ALIGNMENT, relatively to begin of the memory pool. If function successes, it return pointer to newly allocated memory block. On failure, it returns a NULL. To get extended information about failure use stGetLastError function.

Function will be excluded from compilation when functions responsible for memory management are disabled, by setting ST_USE_MEMORY for 0.

SpaceShadow documentation