malloc does not return null when out of memory

Barney Wolff barney at databus.com
Thu Jul 24 09:45:24 PDT 2003


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.


More information about the freebsd-stable mailing list