Can timer task and idle task use dynamic allocation when configSUPPORT_STATIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION are both set to 1
Hello,
If configSUPPORTSTATICALLOCATION and configSUPPORTDYNAMICALLOCATION are both set to 1, timer task and idle task will use static allocation.
Can timer task and idle task use dynamic allocation when configSUPPORTSTATICALLOCATION and configSUPPORTDYNAMICALLOCATION are both set to 1 ?
Version: FreeRTOS v10.2.0
Thanks!
Can timer task and idle task use dynamic allocation when configSUPPORT_STATIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION are both set to 1
No. If static allocation is enabled the timer task and idle task must be statically allocated.
Can timer task and idle task use dynamic allocation when configSUPPORT_STATIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION are both set to 1
OK, Thanks.
Can timer task and idle task use dynamic allocation when configSUPPORT_STATIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION are both set to 1
Actually, you COULD use dynamic allocation if vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() get the memory they return to FreeRTOS from the heap instead of statically allocating it. FreeRTOS would still consider the memory as statically allocated, but as these tasks shouldn’t be deleted the difference doesn’t really matter.
Can’t think of any reason you would want to do that, but you could.