Hi,
I’m using FreeRTOS with CMSIS v1 on STM32F469 uC. Inside project there’s used heap_4.c
I’d like to know how vPortFree really works.
Sample code:
uint8_t* ptr; //declaration of pointer
ptr = (uint8_t*)pvPortMalloc(sizeof(uint8_t)); //assing address on heap - 0x20007e58
if(ptr == NULL)
return -1; //if my pointer is not assigned return from function
*ptr = 0xFF; //assign value to reserved address
vPortFree((void*)ptr); //free memory, so ptr should be NULL, but it's still 0x20007e58
Am I right with understanding vPortFree? Should it assing NULL to the ptr?