BOOL stMemoryExpand( PVOID MemoryPool, PVOID MemoryAddress, SIZE MemorySize );
Address of the memory pool.
Base address of the memory region to be added to the specified memory pool.
Size of the memory region.
TRUE on success or FALSE on failure. Use the stGetLastError function to obtain extended error information.
This function allows attaching additional memory areas to a single, cohesive memory pool. The memory pool must first be initialized using the stMemoryInit function. Integrating new areas enables memory block allocations to be distributed across all regions defined within the memory pool. This facilitates the use of multiple memory segments or the definition of reserved memory addresses.
The value provided in the MemoryAddress parameter must not be NULL, as this value is reserved by the memory management module to indicate undefined areas. To use memory starting at the base address (0x00...), use the stMemoryInit function to declare that area as the initial pool.
If multiple memory areas are not required, this function can be excluded from compilation by setting ST_MEMORY_EXPAND_FUNC to 0. Additionally, the function will not be compiled 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: | BOOL, defining reserved memory areas example, dynamic memory allocation example, FALSE, memory pool initialization example, memory management, NULL, PVOID, SIZE, ST_MEMORY_EXPAND_FUNC, ST_USE_MEMORY, stGetLastError, stMemoryInit, TRUE, using of many memories example |