Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2003 12:45:22 -0400
From:      Barney Wolff <barney@databus.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: malloc does not return null when out of memory
Message-ID:  <20030724164522.GA39964@pit.databus.com>
In-Reply-To: <3F1FF81F.5050701@mac.com>
References:  <20030723173427.GA72876@vmunix.com> <20030723173427.GA72876@vmunix.com> <5.2.0.9.0.20030723234250.052821e8@192.168.0.12> <20030724070936.GA16762@rot13.obsecurity.org> <3F1FF81F.5050701@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 24, 2003 at 11:15:43AM -0400, Chuck Swiger wrote:
> 
> +/* write a single byte per page to disable overcommit behavior */
> +static int malloc_overcommit;

Won't this merely die in malloc, not return 0?
I don't think that's the behavior the original poster was looking for.
The wanted behavior would be fairly expensive to achieve, especially
on an smp machine.

-- 
Barney Wolff         http://www.databus.com/bwresume.pdf
I'm available by contract or FT, in the NYC metro area or via the 'Net.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030724164522.GA39964>