Is the heap used by redlib?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is the heap used by redlib?

Jump to solution
716 Views
muis
Contributor II

I do not use any malloc() calls anywhere in my code, and also no semihosting (Redlib: None).

- Does this automaticly mean that I dont have to worry that my firmware has enough RAM left to have room for the heap space, since I dont use the heap? Or are there some functions (like strlen in string.h) that do make use of the heap behind the scenes? 

Labels (2)
Tags (1)
0 Kudos
1 Solution
501 Views
lpcxpresso_supp
NXP Employee
NXP Employee

For Redlib (None) I am pretty certain that you should be OK. But you can double check in the map file generated in the Debug/Release directory by the link step of your build.

You will currently end up with malloc if you build against Redlib (Nohost) or Redlib (Semihost) though.

Do remember that, even if you are not using the heap, your stack will still consume memory. 

Regards,

LPCXpresso Support

View solution in original post

0 Kudos
1 Reply
502 Views
lpcxpresso_supp
NXP Employee
NXP Employee

For Redlib (None) I am pretty certain that you should be OK. But you can double check in the map file generated in the Debug/Release directory by the link step of your build.

You will currently end up with malloc if you build against Redlib (Nohost) or Redlib (Semihost) though.

Do remember that, even if you are not using the heap, your stack will still consume memory. 

Regards,

LPCXpresso Support

0 Kudos