I'm just getting started with FreeRTOS-Cpp and was playing with a simple example from FreeRTOS+TCP where tasks are spawned to handle each client connection to TCP port 7 (echo). In that scenario, if I understand the FreeRTOS memory scheme correctly, you can run with no system heap because FreeRTOS dynamically creates/destroys objects from its own "heap" which is actually a fixed-length array. So, it provides its own malloc/free.
So, enter FreeRTOS-Cpp. What would be the cleanest way to create FreeRTOS::Task objects as TCP connections come in? If I use new/delete, then that is engaging the system heap in addition to the FreeRTOS pseudo-heap; it also implies the objects will need to self-delete somehow at the end of their task functions. Alternatively, I could use pvPortMalloc() to get memory for the class instance. Is there any alternative I'm missing?
I'm just getting started with FreeRTOS-Cpp and was playing with a simple example from FreeRTOS+TCP where tasks are spawned to handle each client connection to TCP port 7 (echo). In that scenario, if I understand the FreeRTOS memory scheme correctly, you can run with no system heap because FreeRTOS dynamically creates/destroys objects from its own "heap" which is actually a fixed-length array. So, it provides its own malloc/free.
So, enter FreeRTOS-Cpp. What would be the cleanest way to create FreeRTOS::Task objects as TCP connections come in? If I use new/delete, then that is engaging the system heap in addition to the FreeRTOS pseudo-heap; it also implies the objects will need to self-delete somehow at the end of their task functions. Alternatively, I could use pvPortMalloc() to get memory for the class instance. Is there any alternative I'm missing?