malloc does not return null when out of memory

Peter Jeremy peter.jeremy at alcatel.com.au
Wed Jul 23 19:17:33 PDT 2003


On 2003-Jul-23 15:44:36 -0700, Brooks Davis <brooks at one-eyed-alien.net> wrote:
>On Thu, Jul 24, 2003 at 12:36:54AM +0200, Matthias Buelow wrote:
>> Wasn't there a sysctl flag to enable/disable overcommitting?
>> I think I remember something but I can't find it; it might
>> not have been on FreeBSD.
>
>No there isn't.  Overcommit is a fundamental design feature of the BSD
>VM.  If you don't like it, find an OS that doesn't do it.  The only one
>I can think of off the top of my head in Irix where I've found it to be
>a serious pain in the ass.

DEC/Compaq/HP Tru64 has a flag to enable/disable overcommit.  The
major benefit seems to accrue to disk vendors with all the additional
swap space needed.

FreeBSD behaviour in the face of swap shortage is a regular and
popular discussion topic.  I suggest that a perusal of the archives
will probably answer any questions.  If anyone wishes to suggest a
"solution" to FreeBSD's behaviour when there is a shortage of swap,
please include patches.

Peter


More information about the freebsd-stable mailing list