Date: Sat, 24 Feb 2001 14:37:39 -0600 From: seebs@plethora.net (Peter Seebach) To: Dag-Erling Smorgrav <des@ofug.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Setting memory allocators for library functions. Message-ID: <200102242037.f1OKbd618343@guild.plethora.net> In-Reply-To: Your message of "24 Feb 2001 21:28:49 %2B0100." <xzpg0h37rlq.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <xzpg0h37rlq.fsf@flood.ping.uio.no>, Dag-Erling Smorgrav writes: >Malloc() does not overcommit - the kernel does. Malloc() doesn't know >and doesn't care. But it could still probably force the behavior. >None of these solutions are portable, however; Well, no, but the sole available definition of "portable" says that it is "portable" to assume that all the memory malloc can return is really available. >memory overcommit is to write a malloc() wrapper that installs a >SIGSEGV handler, then tries to dirty the newly allocated memory, and >fails gracefully if this causes a segfault. Ugh. Why not just have a flag for memory requests that requires the memory not to be overcommitted, and set it in "conforming mode"? The kernel *could* have memory which must not be overcommitted. -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?200102242037.f1OKbd618343>