Date: Mon, 18 Jan 1999 13:05:24 -0800 From: Mike Smith <mike@smith.net.au> To: Julian Elischer <julian@whistle.com> Cc: Matthew Dillon <dillon@apollo.backplane.com>, Brian Feldman <green@unixhelp.org>, Mike Smith <mike@smith.net.au>, current@FreeBSD.ORG Subject: Re: kernel malloc and M_CANWAIT Message-ID: <199901182105.NAA18722@dingo.cdrom.com> In-Reply-To: Your message of "Mon, 18 Jan 1999 12:57:02 PST." <Pine.BSF.3.95.990118125454.8525G-100000@current1.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > So malloc() will generally not return NULL even in low memory situations > > unless the KVM map fills up, which isn't supposed to happen but can in > > certain severe circumstances. Callers should therefore check for NULL. > > why not just put it in a loop and block on lbolt? > (or call panic) Because you shouldn't panic unless there's no alternative. Panicking on resource starvation is just totally lame. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com 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?199901182105.NAA18722>