Home > other >  About FreeRTOS memory allocation function and c language library functions malloc allocation structu
About FreeRTOS memory allocation function and c language library functions malloc allocation structu

Time:05-27

Run on the single chip microcomputer FreeRTOS, meet a question about memory allocation;
Existing in the structure A, the other in A structure defines A dynamic array B C;
So for A memory allocation, should adopt what kind of style?
Now code inside, use pvPortMalloc first () for A given space;
Subsequent in other functions use malloc for C allocated space; Such allocation feel there should be a problem, but online related information is too little, not find especially helpful articles;
Intuitive phenomenon in the process of debugging for now not to enter the main function; But pvPortMalloc after the modification of first malloc array C space (A) when debugging or the same phenomenon;
For now is there any solution;
Come on! Thank you!
  • Related