LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Out of Memory

[ILUG] Out of Memory

Dave Airlie david.airlie at drua.ie
Mon Mar 6 13:04:42 GMT 2000


> 
>  When a process malloc's memory, you return a null pointer, and the
> program should quit (if it's well written) or soon core dump, if it's
> not. The kernel should reserve the last meg or two for itself, so it could
> keep running until enough processes are given the chop.
> 
Ah this is what Linux does, unfortuantely Linux also does something call
memory overcommital (or something similiarly named), if I do
malloc(3000000) or whatever, the kernel doesn't give me that much memory
until I start to use it later on by dirtying the pages.... so there is no
where for the app to realise oh crap malloc failed as malloc didn't fail,
the kernel just didn't have anything left to fill out the memory it
promised the application earlier on .... 

I have no links, but there is some reason on the net why this is a good
idea ...

Dave.

-- 
		David Airlie, Software Engineer
Drua Technologies Ltd, Innovation Centre, National Tech Park, Limerick.
   t: +353-61-503075 / f: +353-61-338065 / David.Airlie at drua.ie





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell