Reply to post: Re: If only he got so passionate about Linux freezing when it runs out of memory...

Linux kernel's Torvalds: 'I am truly sorry' for my 'unprofessional' rants, I need a break to get help

Orv Silver badge

Re: If only he got so passionate about Linux freezing when it runs out of memory...

I found on systems I managed that turning off memory overcommit helped, but your mileage may vary.

Normally malloc() always succeeds on Linux, whether there's enough memory to handle the request or not. Turning off overcommit causes it to return NULL if there isn't enough memory, as God intended. ;) Most processes don't trap this very well (because malloc() always succeeds, right?) and will crash, but the system will stay up.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon