PVOID stMemoryAlloc( PVOID MemoryPool, SIZE Size );
Address of the memory pool.
Size of the memory block to be allocated.
Pointer to the newly allocated memory block or NULL on failure. Use the stGetLastError function to obtain extended error information.
This function allocates a memory block of a specified size within the designated memory pool. 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. Use the stGetLastError function to obtain extended error information.
This function will be excluded from compilation if memory management functions are disabled by setting ST_USE_MEMORY to 0.
| Version: | 1.0 |
|---|---|
| Header file: | ST_Memory.h (include ST_API.h) |
| See also: | dynamic memory allocation example, memory management, memory pool initialization example, NULL, PVOID, SIZE, AR_MEMORY_ALIGNMENT, ST_USE_MEMORY, stGetLastError |