Re: Memory overcommitting

Chris Wedgwood (chris@cyphercom.com)
Thu, 20 Feb 1997 00:46:56 -0500


>> If you want truly committed memory, walk over it to forcibly
>> allocate the memory (hit one byte every 4k will do it) then mlock
>> it. Ugly...
>
>It shouldn't really even be necessary to mlock() it no? mlock()
>prevents the page from being swapped out, but what we are worried
>about here is the kernel never actually allocating all the pages to
>us. Hitting one byte per 4k would certainly attempt to force the
>kernel to hand out all the pages. :-) And yes, it's ugly.

No, mlock isn't necessary. I only mentioned it because someone was asking
about a hypothetic mission critical database or something dumb.

Anyhow, this thread is getting silly. If someone doesn't like Linux memory
management - then fix it. Otherwise use something else.

(Digital Unix is the same, I assume many other unicies are too. Probably
even NT is similar).

-Chris