Hi Paul,
How much RAM is available for programs? How much RAM is allocated to the stacks? Is it possible to detect stack overflow, or at least report the high water mark? Is dynamic memory allocation, such as malloc() supported? If so, how big is the pool?
I might ask you to hold that thought. The compiler does not report this information, but it sounds like something it should. We'll see if we can add this as a new feature.
At the same time i'll try and writeup a tutorial on memory/stacks/heaps, as it is an interesting area that is worthy of some proper explanation. It would also give context for the questions you are asking.
Some quickfire answers - if they don't make sense, then i'd wait until I get a chance to write up something properly.
Main RAM is 32k, with the RW/ZI regions at the bottom, and shared heap/stack filling the rest. Dynamic memory allocation is certainly usable (so malloc/free and new/delete both work fine). The memory will be allocated in the heap (and hence reduce the memory available for the stack).
More on this once we've had a chance to consider the possibility of the feature upgrade...
Simon
Is it possible to get the compiler to produce a report of how much code space and RAM is used by each module in a program together with the totals?
How much RAM is available for programs?
How much RAM is allocated to the stacks?
Is it possible to detect stack overflow, or at least report the high water mark?
Is dynamic memory allocation, such as malloc() supported? If so, how big is the pool?
Paul