Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2001 10:43:58 -0600
From:      seebs@plethora.net (Peter Seebach)
To:        freebsd-hackers@freebsd.org
Subject:   Re: Setting memory allocators for library functions. 
Message-ID:  <200102241643.f1OGhw616627@guild.plethora.net>
In-Reply-To: Your message of "24 Feb 2001 16:40:33 %2B0100." <xzpu25km6mm.fsf@flood.ping.uio.no> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <xzpu25km6mm.fsf@flood.ping.uio.no>, 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 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




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