Is the heap used by redlib?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is the heap used by redlib?

ソリューションへジャンプ
1,397件の閲覧回数
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,182件の閲覧回数
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,183件の閲覧回数
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 件の賞賛
返信