Re: Memory overcommitting

Floody (flood@evcom.net)
Wed, 19 Feb 1997 23:32:07 -0500 (EST)


-----BEGIN PGP SIGNED MESSAGE-----

On Wed, 19 Feb 1997, Chris Wedgwood wrote:

>
> 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.

+-------------------------------------------------------------------+
+ -- Finger: flood@evcom.net for my PGP public key -- +
+-------------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMwvTyhsjWkWelde9AQENkwP+IUlnwsHM30IcZUwdEAvM0M3GC97OS5PU
PjKHi1VCpfcFBE7ahW2SLyh8WhW1s4wH4kl7WjFWqELZiSC/7zDQS8Wo+WUBNM62
Tlm72EbkFZeqCAbET24otIRHbArmUd7SxD+pOXQ4oBC02iXxkdQhxftvRH8diDDG
gf6bPKFlIPU=
=DGe9
-----END PGP SIGNATURE-----