Home/Support/Support Forum/Linker memory allocation
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Linker memory allocation

0 votes
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
asked May 27, 2003 in NET+OS by shatman Community Contributor (109 points)

Please log in or register to answer this question.

3 Answers

0 votes
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.
answered May 27, 2003 by muscleman Seasoned Professional (215 points)
0 votes
Can I use a heap of 512KBytes or even as low as 256KBytes ?
answered May 27, 2003 by shatman Community Contributor (109 points)
0 votes
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.
answered May 27, 2003 by abcd New to the Community (15 points)