Setting the heap size

Hello, Where/how can I change the default heap size ? By default it is 1 MB but I need at least 6 MB heap for dynamic memory allocation. I am using the GNU NetOS+50 package, any help or advice on this subject will be greatly appreciated. - Gregor

You can change heap size in link file in which .heap align(16) pad(0x100000) set 1M at default. You can change this to 6M by .heap align(16) pad(0x600000) But please note some amount of this memory is used as TCP/IP stack heap defined in appconf.h with #define APP_NET_HEAP_SIZE 0x80000 if you use m_new() dynamically allocate memory, it will use TCP/IP stack heap. if you use malloc() (and other standard C library functions) dynamically allocate memory, it will use the heap other than the TCP/IP stack heap. Therefore, please set up heap size according to your need.

Thank you for your help. I am using the GNU Tools and changed the heap size to 6 MB in debug.ld , below is a code snippet: .heap : { PROVIDE (end = .);PROVIDE (end = .); *(.heap) . += 0x600000; PROVIDE (heap_limit = . ); }