All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Vincent Lefevre <vincent@vinc17.org>, linux-kernel@vger.kernel.org
Subject: Re: [2.4.26] overcommit_memory documentation clarification
Date: Thu, 27 May 2004 09:20:42 -0300	[thread overview]
Message-ID: <20040527122042.GC13095@logos.cnet> (raw)
In-Reply-To: <20040509214941.GG7161@ay.vinc17.org>

On Sun, May 09, 2004 at 11:49:41PM +0200, Vincent Lefevre wrote:
> On 2004-05-09 14:06:11 -0700, Paul Jackson wrote:
> > Vincent wrote:
> > > NULL == (void *) 0 and NULL == 0 must be true
> > Yes - NULL is compares equal to both (void *)0 and 0.
> > No - not necessarily the _same_ value - one could be
> > on a system with 32 bit ints, 64 bit pointers, for example.
> 
> And so?
> 
> > > The goal of malloc is to reserve memory.
> > It's up to the kernel whether sbrk (used by malloc to
> > obtain virtual address space) reserves memory or not.
> 
> More old_mmap than brk (BTW, I forgot to say that this was on
> an x86 machine, I don't know if this matters...).
> 
> > Check out:
> >     /proc/sys/vm/overcommit_memory
> >     Documentation/sysctl/vm.txt - overcommit_memory
> 
> But the documentation is wrong (on an official 2.4.26 kernel).
> It seems that there is no way to get malloc() always return 0
> when there isn't enough memory, even in simple cases (see my
> program posted in the first message).

Right. 

We should or merge Alan's strict-overcommit patches (from RH's tree), 
or fix the documentation.

Marc-Christian Petersen has a patch to fixup the documentation.

  reply	other threads:[~2004-05-27 12:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-09  0:10 [2.4.26] overcommit_memory documentation clarification Vincent Lefevre
2004-05-09  2:04 ` Richard B. Johnson
2004-05-09  2:20   ` Vincent Lefevre
2004-05-09 21:06     ` Paul Jackson
2004-05-09 21:49       ` Vincent Lefevre
2004-05-27 12:20         ` Marcelo Tosatti [this message]
2004-05-27 12:30           ` Marc-Christian Petersen
2004-05-27 13:09             ` Marcelo Tosatti
2004-05-27 13:19               ` Dave Jones
2004-05-27 21:12               ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040527122042.GC13095@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vincent@vinc17.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.