Re: Linux 2.2.15pre12

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Mon Mar 06 2000 - 17:22:33 EST


Paul Jakma wrote:
> [snip]
>
> /proc/sys/vm/overcommit_memory
> overcommit_memory:
>
> This value contains a flag that enables memory overcommitment.
> When this flag is 0, the kernel checks before each malloc()
> to see if there's enough memory left. If the flag is nonzero,
> the system pretends there's always enough memory.
>
> This feature can be very useful because there are a lot of
> programs that malloc() huge amounts of memory "just-in-case"
> and don't much of it.

> /* Sometimes we want to use more memory than we have. */
> if (sysctl_overcommit_memory)
> return 1;
>
> ie if overcommit_memory != 0 then we throw the already sparse
> accounting checks out of the window. It does not turn off
> overcommit!! It makes linux VM even more relaxed!!!

Looks like a bug...

Since the desired default is to enable overcommit, both the default and
the test in mm/mmap.c need to be changed, it seems.

        Jeff

-- 
Jeff Garzik              | Rule 1:
Building 1024            | There is no cabal.
MandrakeSoft, Inc.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:21 EST