From owner-freebsd-hackers Sat Feb 24 19:59:54 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from syncopation-01.iinet.net.au (syncopation-01.iinet.net.au [203.59.24.37]) by hub.freebsd.org (Postfix) with SMTP id 7B22D37B503 for ; Sat, 24 Feb 2001 19:59:51 -0800 (PST) (envelope-from julian@elischer.org) Received: (qmail 2780 invoked by uid 666); 25 Feb 2001 04:11:13 -0000 Received: from i080-119.nv.iinet.net.au (HELO elischer.org) (203.59.80.119) by mail.m.iinet.net.au with SMTP; 25 Feb 2001 04:11:13 -0000 Message-ID: <3A988312.2E238F48@elischer.org> Date: Sat, 24 Feb 2001 19:59:14 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Peter Seebach Cc: freebsd-hackers@freebsd.org Subject: Re: Setting memory allocators for library functions. References: <200102241643.f1OGhw616627@guild.plethora.net> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter Seebach wrote: > > In message , Dag-Erling Smorgrav writes: > >This is all academic since FreeBSD does memory overcommit, so unless > >you run out of address space for your process before you run out of > >actual memory and/or swap (not likely, but quite possible) malloc() > >will never return NULL and you won't know a thing until you dirty one > >page too many and segfault. > > Is there any hope that, some day, a setting could be provided where a program > could request that malloc *NOT* overcommit? There are programs which would > rather know in advance, and clean up, than be killed abruptly. > to not be caught by surprise, simply touch every page after you allocate it. > (To be pedantic, this is a conformance issue. If the memory isn't actually > allocated, malloc shouldn't be returning a non-null pointer.) > > -s > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message