Can some throw bright light on Linux Memory Allocation

Mark Kirkwood markir at paradise.net.nz
Thu Aug 7 23:31:24 UTC 2008


You might also want to read up on controlling overcommit behaviour via 
the sysctls 'vm.overcommit_memory' and 'vm.overcommit_ratio'.

These are not terribly well documented, but a quick search got me this link:

http://www.win.tue.nl/~aeb/linux/lk/lk-9.html

which seemed quite good.

regards

Mark

 
MirJafar Aki wrote:
> Hi Rashkae,
>
> Thanks for great explanation and the link. It was really useful
> to understand the aggessive optimization done by OS.
>
> Thanks.
> Mir
>
> On Thu, Aug 7, 2008 at 8:24 PM, Rashkae <ubuntu at tigershaunt.com 
> <mailto:ubuntu at tigershaunt.com>> wrote:
>
>     Rashkae wrote:
>
>     >>
>     >
>     > It's been a while since I read up on this and and my terminology
>     will be
>     > way off, (as well, some of my information will be out of date.)
>     >
>     > The short of it, Linux doesn't allocate memory absolutely on malloc.
>     > You can malloc more memory than you have available, but will
>     fail when
>     > you application tries to fill this memory and the system runs
>     out.  This
>     > is a deliberate design decision done for performance and or other
>     > esoteric reasons beyond my ken.  I also had some sample code of
>     an app
>     > that would malloc large memory, then try to fill that memory and
>     the app
>     > itself would in theory end gracefully if the memory proved
>     unavailable.
>     >  In practice, bad things tend to happen to the whole system once
>     you hit
>     > OOM.
>     >
>
>     BTW, first google hit for Linux Memory Allocation
>     http://www.linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html
>
>     --
>     ubuntu-users mailing list
>     ubuntu-users at lists.ubuntu.com <mailto:ubuntu-users at lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>





More information about the ubuntu-users mailing list