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

From: Peter Tufvesson (tuwe@flakey.df.lth.se)
Date: Thu Jan 06 2000 - 12:39:46 EST


Ok, I have now made some more investigation.

This is my understanding of how (part of) the process memory space is used

0x0 - 0x40000000 : Used by brk(). It starts low and grows up. Close to 1GB
0x4000000 - 0xc0000000 : Used by mmap(). It starts low and grows up. 2GB
0xfffffff - ? : Used by the stack. It starts high and grows down. 1GB.

Is this correct? If so, WHY???

By doing this, you have effectively limited the amount of mmap()ped memory
to 2GB and the amount of brk()ed memory to 1GB. So even if the process
memory is in total 3GB, it is very unlikely that a process uses more than
1GB or 2GB (depending if it uses mmap() or brk() )

Solaris, on the other hand, lets the mmap() region start high at 0xf400000
and grow down. This way, the process is entitled to 3GB of EITHER brk() or
mmap() memory!

Am I totally wrong, or can the Linux code be dramatically and
easily improved?

/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:06 EST