Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 1999 16:47:27 -0500 (EST)
From:      Brian Feldman <green@unixhelp.org>
To:        Mike Smith <mike@smith.net.au>
Cc:        Julian Elischer <julian@whistle.com>, Matthew Dillon <dillon@apollo.backplane.com>, current@FreeBSD.ORG
Subject:   Re2: kernel malloc and M_CANWAIT 
Message-ID:  <Pine.BSF.4.05.9901181640570.18713-100000@janus.syracuse.net>
In-Reply-To: <199901182105.NAA18722@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Jan 1999, Mike Smith wrote:

> > >     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.

Ahem:
uipc_mbuf.c: unmodified, readonly: line 268 of 945 [28%]
                        panic("Out of mbuf clusters");
uipc_mbuf.c: unmodified, readonly: line 296 of 945 [31%]
                        panic("Out of mbuf clusters");
And if the max number of mbuf clusters is{, to become} a sysctl, shouldn't
these just be informative printf()s or something?


> 
> -- 
> \\  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
> 

 Brian Feldman					  _ __  ___ ___ ___  
 green@unixhelp.org			      _ __ ___ | _ ) __|   \ 
	     http://www.freebsd.org/	 _ __ ___ ____ | _ \__ \ |) |
 FreeBSD: The Power to Serve!	   _ __ ___ ____ _____ |___/___/___/ 


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?Pine.BSF.4.05.9901181640570.18713-100000>