cancel
Showing results for 
Search instead for 
Did you mean: 

Heap size

samiassaad
Associate II
Posted on March 28, 2011 at 09:08

Heap size

4 REPLIES 4
Andrew Neil
Chief II
Posted on May 17, 2011 at 14:29

This is a standard 'C' term;  it has nothing specifically to do with the STM32 - or even with embedded development!

The Heap is the term used for the memory ''pool'' available for dynamic memory allocation by the standard 'C' library functions such as malloc

''how does heap size effect my project? how to set it ? usage of it ?''

 

 

That depends on the particular tools you are using

''Could you give a quik veiw please ?''

 

 

You will need to study the manuals for the particular tools that you are using.

Note that dynamic memory allocation is often best avoided on embedded systems...
samiassaad
Associate II
Posted on May 17, 2011 at 14:29

Thank you Neil

I am using uv4 (keil ) ; I could dont find info about heap in the manual , could you give a link or a short info please ?

what is the effect of small heap and large heap on a project ?

Andrew Neil
Chief II
Posted on May 17, 2011 at 14:29

http://www.keil.com/forum/18655/

Posted on May 17, 2011 at 14:29

what is the effect of small heap and large heap on a project ?

The size of the heap constrains the total capacity of malloc()'s you can have outstanding. If you fragment the heap, your total/linear capacity will be diminished, as it will if you leak resources (fail to free).

With GNU/GCC the heap basically takes all the unallocated RAM between your statics, and your stack.

http://www.lmgtfy.com/?q=embedded+software+heaps

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..