Defines | |
| #define | NOSCFG_FEATURE_MEMALLOC 1 |
| #define | NOSCFG_MEM_MANAGER_TYPE 1 |
| #define | NOSCFG_MEM_OVWR_STANDARD 1 |
| #define | NOSCFG_MEM_USER_MALLOC mymalloc |
| #define | NOSCFG_MEM_USER_FREE myfree |
| #define | NOSCFG_STKMEM_RESERVE 0 |
| #define | NOSCFG_MEM_MANAGE_MODE 0 |
| #define | NOSCFG_FEATURE_MEMSET 1 |
| #define | NOSCFG_FEATURE_MEMCOPY 1 |
| #define | NOSCFG_FEATURE_REALLOC 0 |
Variables | |
| void * | __heap_start |
| void * | __heap_end |
|
|
Include dynamic memory management functions. The nano layer supports an own implementation of the malloc() and free() memory functions, and it has a multitasking able framework for external memory functions. If this define is set to 1, the memory management functions will be compiled into the nano layer. |
|
|
Include function nosMemCopy. If this definition is set to 1, the function nosMemCopy will be included into the nano layer. |
|
|
Include function nosMemSet. If this definition is set to 1, the function nosMemSet will be included into the nano layer. |
|
|
Include function nosMemRealloc. If this definition is set to 1, the function nosMemRealloc will be included into the nano layer.
|
|
|
Set the working scheme of the internal nano layer memory allocator.
|
|
|
Set type of memory manager. Three types are possible: |
|
|
Overwrite standard malloc/realloc/free/memcpy/memset functions with nano layer memory functions: |
|
|
User defined memory free function. The user may supply its own memory allocator functions. This define is set to the function name of the user's memory free function.
|
|
|
User defined memory allocation function. The user may supply its own memory allocator functions. This define is set to the function name of the user's memory allocation function.
|
|
|
Number of bytes reserved in the stack frame for the memory allocator. If heap memory is used for stack memory at task creation, there can be an ugly side effect: When the task terminates again, and the RTOS frees the stack memory by calling a mem-free function, the memory allocator will chain the memory block into a list of free blocks (=> memory pointers will be written to the top or bottom of the no more used stack frame). But the stack frame remains still active for a couple of subroutine jump backs, so the memory block is still modified even it is assumed to be unused. To avoid the corruption of memory pointers in the stack frame block, this define can be used to reserve some space for the memory allocator at the root of the stack frame. If the processor stack grows from top to bottom (most usual), the stack root is the highest memory location, and in most cases this define can be set to zero (= don't reserve any space). |
|
|
This is a pointer to the end of the memory heap. It can either be a real variable pointing to the end of heap memory, or it can be a simple static constant define. It is recommended to let the linker generate a label with this name that points to the end of unused RAM memory. |
|
|
This is a pointer to the start of the memory heap. It can either be a real variable pointing to heap memory, or it can be a simple static constant define. It is recommended to let the linker generate a label with this name that points to the start of unused RAM memory. |
1.4.6-NO