stFixedMemAlloc Function
Declaration:
PVOID stFixedMemAlloc(
  PVOID MemoryPool
);
Parameters:
MemoryPool

Address of the memory pool.

Return value:

Pointer to the newly allocated memory block or NULL on failure.

Description:

This function allocates a memory block within the specified memory pool. The block size is determined during memory pool initialization. Allocated addresses are always aligned to the value specified in AR_MEMORY_ALIGNMENT, relative to the start of the memory pool. On success, it returns a pointer to the newly allocated memory block. On failure, it returns NULL. This function does not set the last error code upon failure. Access to fixed-size memory is not internally synchronized; if thread safety is required, it must be implemented externally.

This function will be excluded from compilation if fixed-size memory management functions are disabled by setting ST_USE_FIXMEM to 0.

SpaceShadow documentation