phk malloc, was (Re: ptmalloc2)

David Xu davidxu at viatech.com.cn
Wed Feb 23 17:14:56 PST 2005



Dan Melomedman wrote:
Bill Hacker wrote:

If the 'email proxy in question' is that fragile - your statement would 
appear to be true.


It's only fragile because the OS doesn't guarantee preallocated memory.
That's all. Anyway, I've made the decision to only run software like
this on Linux. Linux actually has the system-wide overcommit switch through
'sysctl'. I wish I could switch it on and off per process through an
environment variable instead. Oh well, can't have it all.
You will have an unusable machine if you turn on overcommit,
when memory is about to be exhausted, any code not written by you
will crash because they don't check if malloc will fail!
Any program and system utilities will core dump or be locked there
if memory is exhausted, in the machine, your code only occupies
1/10000 or less, making 1/10000 code to be overcommit aware does not
make sense.
Regards,
David Xu





More information about the Kernel mailing list