From owner-freebsd-current Mon Jan 18 14:37:00 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA25135 for freebsd-current-outgoing; Mon, 18 Jan 1999 14:37:00 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles250.castles.com [208.214.165.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA25129 for ; Mon, 18 Jan 1999 14:36:56 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id OAA19242; Mon, 18 Jan 1999 14:33:19 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199901182233.OAA19242@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: current@FreeBSD.ORG Subject: Re: kernel malloc and M_CANWAIT In-reply-to: Your message of "Tue, 19 Jan 1999 09:11:38 +1100." <199901182211.JAA17726@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 18 Jan 1999 14:33:18 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > If the system is simply low on memory, kmem_malloc() will block. > > > > 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. > > Callers that check for NULL are bogus. If it can truly never return NULL, that's true. But it would also be true to say that callers that can't deal with a veto return and that can't guarantee deadlock avoidance are also bogus. I got the impression that my understanding of M_WAITOK's behaviour came from a discussion with you about it, but it looks like I was mistaken. -- \\ 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