Re: Can a process use up more than 910MB?

From: Peter Tufvesson (tuwe@flakey.df.lth.se)
Date: Thu Jan 06 2000 - 20:50:09 EST


On Wed, 5 Jan 2000, Philip Blundell wrote:

> >It turned out that a 2.1.12 kernel compiled for 1GB of physical memory
> >only allowed the process to allocate 910MB! Can anyone comment on this? I
>
> Your heap is probably colliding with the shared libraries (which typically
> start at 0x40000000). Try linking with -static.

You are on the right track. The problem is not the shared libraries
themselves, but where they end up. mmap() allocated memory from 0x40000000
and grows upward by default. This is the problem. I changed this so that
it now allocates from 0x80000000 and upwards. So now I have a 2GB heap
instead of a 1GB heap.

This was accomplished by changing the TASK_UNMAPPED_BASE to some larger
figure in include/asm/processor.h (TASK_SIZE-1G for example)

I chose a 2GB heap and a 1GB mmap area instead of 1/2GB. This works alot
better for me, since the programs I have usually do malloc() and not
mmap().

/Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:08 EST