Kernel description
UM1743
30/111
DocID026161 Rev 4
The kernel memory manager is based on a single memory pool that could be placed
anywhere in the additional internal or external memory resources. The memory heap is built
on a contiguous memory blocks managed by the mem_Typedef structure through a pages
table that gather the block status after each memory allocation or deallocation operations.
For the STM32CubeF4 demonstration, the memory heap is located in the CCM data RAM.
Figure 26. Memory heap for STM32CubeF4 demonstration
The memory manager offers a set of standard high level APIs to allocate and free memory
block from the predefined pool. The granularity of the memory allocation is defined by the
SIZE_OF_PAGE define, set to 1024 bytes by default and the total number of available
blocks depending on the heap size, in the k_mem.h file as shown in the code below.