I am having problems adapting an esp-idf code (esp32 native language) to Arduino language, based on a github code (https://github.com/espressif/esp-idf/blob/master/examples/system/freertos/real_time_stats/main/real_time_stats_example_main.c), it gives me an error when equating the malloc () function with a variable of the TaskStatus_t type, which is done in the original github code (written in esp32-idf, line 62) and I do not know how to adapt that code to Arduino language. Code that I am adapting to the Arduino language:
TaskStatus_t *startArray = NULL;
TaskStatus_t *endArray = NULL;
UBaseType_t startArraySize;
UBaseType_t endArraySize;
startArraySize = uxTaskGetNumberOfTasks() + 5;
startArray = malloc(sizeof(TaskStatus_t) * startArraySize);
PS: I don’t know anything about esp-idf that’s why I’m asking
joaquinStrada is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.