Separate Stack and Heap

Top  Previous  Next

Rather than using DATA=, you can specify the requirements of the stack and heap separately. This enables the configurer to map them to different physical memory blocks, if this would be useful. For example:

 

task integ stack=5k heap=15k

 

It is possible to use a question mark with the STACK or HEAP attributes, like this:

 

task integ stack=5k heap=?

 

This allocates the largest block of contiguous unassigned memory on the processor to the logical area specified.

 

Dragons003Only one logical area attribute on a processor may be specified in this way.

 

Dragons003If you specify one of STACK or HEAP without specifying the other, the unspecified area is given no memory at all. This nearly always results in the application failing.