Re: Overcomittable memory

From: Marco Colombo (
Date: Tue Mar 21 2000 - 07:57:07 EST

On Tue, 21 Mar 2000, James Sutherland wrote:

> So? If you touch the memory, overcommit doesn't come into play.

All processes should do that for it to work. Example (you have 128MB of swap):

you malloc() 1MB of space, and touch every page on it. Does swap gets
allocated at this time? Assume it is (I'm not sure: the pages are dirty,
but get written on swap when needed, at later time).

Another process malloc 128MB of space. It does not touch the pages,
overcommiting allows malloc() to succeed.

RAM gets used up by some one else. Your pages get swapped out.

Later, you access one page of yours. It's not in RAM. The system has to
fetch it from swap. First, it has to locate a free page-frame. There is none.
So, it has to swap-out some other page. But, wait, swap space is full.
What happens? It's your process causing the page fault.

Even if your process has all swap space allocated, it's not enough.
Overcommiting for other processes still hits you.


      ____/  ____/   /
     /      /       /			Marco Colombo
    ___/  ___  /   /		      Technical Manager
   /          /   /			 ESI s.r.l.
 _____/ _____/  _/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:32 EST