PVOID stFixedMemAlloc( PVOID MemoryPool );
Address of the memory pool.
Pointer to the newly allocated memory block or NULL on failure.
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.
| Version: | 1.0 |
|---|---|
| Header file: | ST_FixMem.h (include ST_API.h) |
| See also: | AR_MEMORY_ALIGNMENT, fixed size memory pool initialization example, memory allocation example, NULL, PVOID, ST_USE_FIXMEM, stFixedMemFree |