Date: Wed, 14 Apr 1999 11:01:03 -0400 (EDT) From: Mikhail Teterin <mi@kot.ne.mediaone.net> To: current@freebsd.org Subject: Re: swap-related problems Message-ID: <199904141501.LAA25847@kot.ne.mediaone.net> In-Reply-To: <635.924100749@critter.freebsd.dk> from Poul-Henning Kamp at "Apr 14, 1999 04:39:09 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp once stated: =malloc() on FreeBSD returns NULL when it cannot allocate the memory =asked for. =If you have an example where this is not the case I would VERY =much like to see it. I believe, a number of examples were given, when the use of the non-NULL pointer returned by malloc resulted in the program being killed. Those who asked why, were given an answer: . because you allocated more memory then you have They then, rightfully exclaimed: . but should not malloc() have returned me NULL? And the rest is drowned in the explanations of why it is very hard to assure. I'm repeating myself here and so do others. We are probably facing the major disadvantange of the "overcommit" strategy, and there may not, indeed, be a way around this. Documenting this properly is what is definitely in order... While we are at this, what is the right way to find out if the returned pointer can be used? -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904141501.LAA25847>