On Tue, 27 Apr 1999, Benno Senoner wrote:
Hi,
My system is a Redhat 5.2 running on
linux 2.2.6 + raid0145-19990421.
1)
my frist BIG QUESTION is if there is a design flaw in malloc() or not:
when I do (number of successfully allocated blocks)* 4MB
then I get 2GB of *SUCCESSFULLY* malloc()ed memory,
but my system has only about 100MB of virtual mem
(64MB RAM + 40MB swap).
How hopes the kernel to squeeze the allocated 2GB in 100MB of virtual
mem ?
:-)
Does anyone know why the kernels does not limit the maximum malloc()ed
memory
to the amount of RAM+SWAP ?
That's a feature!
some programmes like to malloc loads of memory even though they don't
use it. there's a sysctl which you can set so that the kernel grants
all malloc()'s:
/proc/sys/vm/overcommit_memory
this is probably set to 1 on your machine. (the default is 0, so i
don't know how it got set on your box).
regards,
--
Paul Jakma
[EMAIL PROTECTED] http://hibernia.clubi.ie
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
-------------------------------------------
Fortune:
The more they over-think the plumbing the easier it is to stop up the drain.