Heap management module. More...
|
Data Structures | |
| struct | mblock_free |
| Free memory block delimiter structure (size must be word multiple). More... | |
| struct | mblock_used |
| Used memory block delimiter structure (size must be word multiple). More... | |
Defines | |
| #define | KE_HEAP_SIZE NX_HEAP_SIZE |
| Heap size for nX. | |
Functions | |
| struct mblock_free * | ke_mem_init (void) |
| Heap initialization. | |
| void * | ke_malloc (uint32_t size) |
| Allocation of a block of memory. | |
| void | ke_free (void *mem_ptr) |
| Freeing of a block of memory. | |
Variables | |
| uint8_t | ke_mem_heap [KE_HEAP_SIZE] |
| Data area reserved for the kernel heap. | |
Heap management module.
The KEMEM module implements heap management functions that allow initializing heap, allocating and freeing memory.
| void ke_free | ( | void * | mem_ptr | ) |
Freeing of a block of memory.
Free the memory area pointed by mem_ptr : mark the block as free and insert it in the pool of free block.
| [in] | mem_ptr | Pointer to the memory area that need to be freed. |
| void * ke_malloc | ( | uint32_t | size | ) |
Allocation of a block of memory.
Allocates a memory block whose size is size; if no memory is available return NULL
| [in] | size | Size of the memory area that need to be allocated. |
Referenced by ipc_emb_kmsg_hdlr().
| struct mblock_free * ke_mem_init | ( | void | ) | [read] |
Heap initialization.
This function performs the following operations:
1.6.1