Re: Bare-metal: how to specify the heap size in the linker script
Nick Clifton <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Claudio, >>From the link provided by Nick (thanks!) it seems that when using dynamic > allocation (e.g. malloc/new) newlib always checks if the heap is going to > overwrite the current stack. > However, it may happen that the stack then grows further and overwrites the > heap. Did I understood correctly ? Yes. Although you may be able to turn on stack checking, depending upon what compiler you are using. If the stack check routines are written correctly (you may have to do this...) then they can detect stack overflow before it happens and so abort the program. Cheers Nick