Requesting 'real' memory
Posted Feb 1, 2008 21:26 UTC (Fri) by
giraffedata (subscriber, #1954)
In reply to:
Requesting 'real' memory by zooko
Parent article:
Avoiding the OOM killer with mem_notify
The kernel reserves at least one page frame for anonymous virtual memory (actually, it's a whole lot more than that, but in theory one frame is enough for all the processes to access all their virtual memory as long as there is adequate swap space).
So any kernel real memory allocation can fail, and the code is painstakingly written to allow it to handle that failure gracefully (more gracefully than killing an arbitrary process). It allocates memory ahead of time so as to avoid deadlocks and failures at a time that there is no graceful way to handle it.
(
Log in to post comments)