Linker memory allocation

HelloWhat are the minimum size limitations and main factors that determine the size of the following memory areas … .heap align(16) pad(0x100000) : .netosstack align(16) pad(0x3000) : .stack align(16) pad(0x2000) : .free_mem align(16) pad(0x10000) : Which memory size can I decrease ?? Thank you Regards Michael

With in the Linker Directives File, there are two NETSilicon provided linker directives one of which is .netosstack mainly is the stack for each processing mode that grows downward and that you would need to refer to init.s at once. The other one is .free_mem which is the area of memory used by the THREADX kernel to create timer and root threads. This should not be used for any other purpose. To answer your question of .stack that is a GHS supplied linker directive and is the size and location of runtime stack meaning the use at the instance of running the application. You can increase the heap.

Can I use a heap of 512KBytes or even as low as 256KBytes ?

Yes, you can use only 512K or 256K for heap section. The heap section is used by Green Hills runtime libraries for dynamic memory allocation. If the Green Hills runtime libraries are not used, the .heap section can be omitted. When you set up this section size, please consider the factors of how often the malloc() and other standard C memory allocation routines are used and how big the memory requested, so that the .heap section have enough memory for these functions sucessful.