Skip site navigation (1)Skip section navigation (2)
Date:      20 Jul 1999 09:53:24 +0300
From:      Ville-Pertti Keinonen <will@iki.fi>
To:        des@flood.ping.uio.no (Dag-Erling Smorgrav)
Cc:        hackers@freebsd.org
Subject:   Re: Overcommit and calloc()
Message-ID:  <86zp0rizh7.fsf@not.demophon.com>
In-Reply-To: des@flood.ping.uio.no's message of "19 Jul 1999 19:41:31 %2B0300"
References:  <001f01bed205$e8aeecc0$291c453f@kbyanc.alcnet.com> <xzpyagclhl8.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help

des@flood.ping.uio.no (Dag-Erling Smorgrav) writes:

> "Kelly Yancey" <kbyanc@alcnet.com> writes:
> >   Ahh...but wouldn't the bzero() touch all of the memory just allocated
> > functionally making it non-overcommit?
> 
> No. If it were an "non-overcomitting malloc", it would return NULL and
> set errno to ENOMEM, instead of dumping core.

It won't dump core.  If it isn't the biggest process, it'll simply
succeed, but somebody else is killed.  If it's the biggest process,
it'll die with SIGKILL without dumping core.

There *are* systems that kill "random" processes when swap runs out,
presumably when they need to actually get pages that aren't available.
FreeBSD is not one of them.

Overcommit still has nothing to do with malloc.  Either the *system*
is overcommitted or it isn't - per-process overcommitment is
irrelevant, as is the way memory has become overcommitted.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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