stMemoryExpand function
Declaration:
BOOL stMemoryExpand(
  PVOID MemoryPool,
  PVOID MemoryAddress,
  SIZE MemorySize
);
Parameters:
MemoryPool

Address of the memory pool.

MemoryAddress

Base address of the memory to join with specified memory pool.

MemorySize

Size of the memory.

Return value:

TRUE on success or FALSE on failure. Use stGetLastError function to obtain extended error information.

Description:

Function allows attaching next memory areas into one cohesive memory pool. Memory pool should be initialized first, by stMemoryInit function. The integration causes that new memory blocks allocation will be arranged on each areas, defined by memory pool. This allows to easy use of several memories or to define reserved memory addresses.

Value given in MemoryAddress parameter should not be NULL, because it is reserved, used by memory management module to mark undefined areas. To use memory located at the base address, (0x000...) use a stMemoryInit function first to declare this area.

If multiple memory areas are not used, function can be excluded from compilation by setting ST_MEMORY_EXPAND_FUNC for 0. Function will not be compiled when functions responsible for memory management are excluded by setting ST_USE_MEMORY for 0.

SpaceShadow documentation