Issue
I have a Linux running on a ARM Cortex-A8 processor board. The version of the kernel is obtained by (uname -a):
Linux 2.6.29-dirty #2 Fri Jan 29 16:54:21 IST 2010 armv7l unknown
To debug some of my application which crashes due to malloc() failure(The size i am mallocing is large), and the board has 208 MB DRAM. On this Linux/board setup, i need to find out :
What is the Heap Size that is allocated/set aside for this kernet config.
How can i increase this heap size. Does it need kernel re-build/new version of kernel image?
Solution
I don't know about specifics of the ARM Linux; however, assuming that you are talking about userspace application and not kernel space, there is inherently no 'heap size'. The 'classical unix way' of userspace memory management is an 'expanding heap' - the application has a heap of finite size and when it needs to expand it, it calls the brk() function. I guess you have no swap and disabled overcommit on this platform - looki into /proc/meminfo (or output of 'top') to see the available memory.
Answered By - ondra