lkml.org 
[lkml]   [2000]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Overcommitable memory??
Den 17-Mar-00 00:55:01 skrev James Sutherland følgende om "Re: Overcommitable memory??":

> Yes... So if you disabled overcommit, AND used a malloc wrapper which
> touches every page when it is allocated, you could guarantee the memory
> you had been "allocated" was REALLY allocated.

When you say "disabled overcommit", are you referring to the current
implementation of /proc/sys/vm/overcommit_memory set to zero? If so, you
are right, except that an OOM killer can still select your process to be
the one to kill. I.e. you could have saved your trouble. Worse yet, you
could cause another process to be killed because you touch the pages.

If you're talking about a working option to disable overcommitment of
memory, then:

1. If you don't overcommit, there is no need to touch the pages and no
gain from doing so.
2. If you do overcommit, touching the pages won't protect you from an
OOM killer.

> Anyway, this all has nothing to do with the original topic, which related
> to how to handle out-of-memory situations - i.e. once all the memory has
> been allocated, however you allocate it.

Only one thing: If you don't overcommit memory, the kernel will never
need to use an OOM killer.

Regards,

/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯T¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
| Rask Ingemann Lambertsen | E-mail: mailto:rask@kampsax.dtu.dk |
| Please do NOT Cc: to me or the | WWW: http://www.gbar.dtu.dk/~c948374/ |
| mailing list. I am on the list.| "ThrustMe" on XPilot, ARCnet and IRC |
| It is my tag line - I stole it first! |


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.374 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site