mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Support allocating stack from separate heap (#267)
The change adds support for allocating task stacks from separate heap. When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 1 in FreeRTOSConfig.h, task stacks are allocated and freed using pvPortMallocStack and vPortFreeStack functions. This allows the application writer to provide a separate allocator for task stacks. When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 0, task stacks are allocated and freed using FreeRTOS heap functions pvPortMalloc and vPortFree. For backward compatibility, configSTACK_ALLOCATION_FROM_SEPARATE_HEAP defaults to 0. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
81f5892105
commit
2a604f4a28
4 changed files with 19 additions and 5 deletions
|
@ -896,6 +896,11 @@
|
|||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||
#endif
|
||||
|
||||
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
||||
/* Defaults to 0 for backward compatibility. */
|
||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||
#endif
|
||||
|
||||
#ifndef configSTACK_DEPTH_TYPE
|
||||
|
||||
/* Defaults to uint16_t for backward compatibility, but can be overridden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue