lkml.org 
[lkml]   [2005]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: overcommit verses MAP_NORESERVE
From
Date
On Sad, 2005-08-06 at 20:52 -0700, Nicholas Miell wrote:
> Why does overcommit in mode 2 (OVERCOMMIT_NEVER) explicitly force
> MAP_NORESERVE mappings to reserve memory?
>
> My understanding is that MAP_NORESERVE is a way for apps to state that
> they are aware that the memory allocated may not exist and that they
> might get a SIGSEGV and that's OK with them.

Because a MAP_NORESERVE space that is filled with pages might cause
insufficient memory to be left available for another object that is not
MAP_NORESERVE.

You are right it could be improved but that would require someone
writing code that forcibly reclaimed MAP_NORESERVE objects when we were
close to out of memory. At the moment nobody has done this, but nothing
is stopping someone having a go.

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

\
 
 \ /
  Last update: 2005-08-07 13:26    [W:0.103 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site