Analyze Heap size

cancel
Showing results for 
Search instead for 
Did you mean: 

Analyze Heap size

Jump to solution
699 Views
hiroshihiraga
NXP Employee
NXP Employee

Hi, 

Is it possible to analyze a heap size? 

I know that there is a feature of FreeRTOS heap size monitoring. 

Standard C library malloc or even sprintf uses heap memory that is not managed region of memory by RTOS.

I think such standard C library is not recommended to use when RTOS is used due to non thread safe. But, some customers still want to use such C standard library and analyze the heap size.

Hiroshi,

Labels (1)
0 Kudos
1 Solution
595 Views
converse
Senior Contributor IV

Mixing heaps (C library and FreeRTOS) is not a good idea and could lead to some very hardtop-debug issues. However, if you insist, then see

Heap allocation/checking in Redlib 

and the final reply here

https://community.nxp.com/thread/521689 

View solution in original post

0 Kudos
3 Replies
595 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Hiroshi,

MCUxpresso IDE has tools for FreeRTOS HEAP usage monitor. This is the easiest way.

FreeRTOS itself hasn't such a library. There is some discuss on internet about how to monitor. People have to write monitor code by themselves.

Regards,

Jing

0 Kudos
595 Views
hiroshihiraga
NXP Employee
NXP Employee

HI, jingpan

Thanks, ok. I will look up the internet.

And, don't you have any information about monitoring the heap size that is not managed by RTOS?

Hiroshi,

0 Kudos
596 Views
converse
Senior Contributor IV

Mixing heaps (C library and FreeRTOS) is not a good idea and could lead to some very hardtop-debug issues. However, if you insist, then see

Heap allocation/checking in Redlib 

and the final reply here

https://community.nxp.com/thread/521689 

View solution in original post

0 Kudos