During system configuration, it must be determined whether the system should utilize the entire RAM or only a restricted area. This is defined by the OS_INTERNAL_MEMORY_SIZE constant.
If the entire memory area is to be used, OS_INTERNAL_MEMORY_SIZE should be set to 0. In this case, the system will utilize the stMemAlloc and stMemFree functions to allocate and release memory, meaning memory will be allocated within the user area. This configuration is recommended only when it is certain that memory leaks will not occur in the user program, as such leaks may compromise system data integrity.
Alternatively, the system can utilize a dedicated memory pool. The size of this pool is determined by OS_INTERNAL_MEMORY_SIZE. A global buffer will be created, reserved exclusively for the system, where all memory allocation and deallocation operations will be performed.
In both cases, memory management within the Standard Library must be enabled by setting the value of ST_USE_MEMORY to 1. The OS_INTERNAL_MEMORY_SIZE constant is ignored if the value of OS_USE_FIXMEM_POOLS is set to 1.
| Version: | 1.0 |
|---|---|
| See also: | memory management, standard library, stMemAlloc, stMemFree, system memory management, OS_INTERNAL_MEMORY_SIZE, OS_USE_FIXMEM_POOLS, ST_USE_MEMORY |