7 posts • Page 1 of 1
If I allocated x amount of stack for task 1, then task 1 calls xTaskCreate() to create task 2, giving it y amount of stack, then would the y amount come out of the x amount or not? My hope is not. When a task ends, the memory is released, correct? Thanks.
No. Task memory is allocated using malloc() (well, technically it's a version of malloc that only allocates from internal memory) and freed using free() when vTaskDelete() is called and the idle task gets the chance to clean up the task. In other words: The stack of the calling task is unaffected, and the memory will be returned to the heap after a task is cleaned up.
Thanks for clarifying. Then what does the psram do in wrover modules? Hash space other than task stacks, like allocating large memory blocks? Could you point me to some documentation on different ESP32 memories and psram?
Who is online
Users browsing this forum: No registered users and 20 guests