Is the heap used by redlib?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Is the heap used by redlib?

跳至解决方案
1,362 次查看
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? 

标签 (2)
标记 (1)
0 项奖励
回复
1 解答
1,147 次查看
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 项奖励
回复
1 回复
1,148 次查看
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 项奖励
回复