Date: Mon, 22 Sep 1997 03:02:40 -0500 (EST) From: "John S. Dyson" <toor@dyson.iquest.net> To: tlambert@primenet.com (Terry Lambert) Cc: karpen@ocean.campus.luth.se, sef@Kithrup.COM, hackers@FreeBSD.ORG Subject: Re: Bug in malloc/free (was: Memory leak in getservbyXXX?) Message-ID: <199709220802.DAA00175@dyson.iquest.net> In-Reply-To: <199709220627.XAA16498@usr07.primenet.com> from Terry Lambert at "Sep 22, 97 06:27:34 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert said: > > > Then it would indeed be guaranteed that the second malloc() would succeed. > > > > Am I right? Maybe I'm completely off instead? :-) > > You're wrong. Memory is overcommited. This means that there is no > guarantee that a backing page exists for the kernel to be able to > associate it with the process as a result of the fault. > > I would tend to use softer language, but there is no guarantee that memory exists immediately after a 400K malloc, for example. Those pages aren't faulted until needed. There is some attempt to avoid the most obvious problems, but no guarantees. -- John dyson@freebsd.org jdyson@nc.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709220802.DAA00175>