AnsweredAssumed Answered

How to locate stack and heap memory at the predefined region

Question asked by obid.matic on Oct 3, 2016
Latest reply on Oct 4, 2016 by obid.matic


I would like to implement MPU for stack overflow detection. I suppose that I should know in advance where the boundaries of stack and heap are.

Is it possible to read these boundaries from C code? Or is it possible to define exact region which will be reserved for stack and heap?

I know I can set stack and heap size in startup file, but there is no definition for top of the stack (or bottom of the heap).

Thank you