Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2002 21:39:54 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Wemm <peter@wemm.org>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Richard Wenninger <richard@richardw.net>, <current@FreeBSD.ORG>
Subject:   Re: UMA lock 
Message-ID:  <20020529212412.U24797-100000@gamplex.bde.org>
In-Reply-To: <20020529072020.89F16380A@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 May 2002, Peter Wemm wrote:

> M_NOWAIT to the mbuf m_get*, malloc*, contigmalloc*, uma_* etc means
> "you must not tsleep!".  M_WAITOK conversely means that tsleep should be
> called as needed.  Things like malloc still can return NULL even with M_WAITOK
> for non-recoverable scenarios.

malloc() itself can't do this, unless malloc(M_WAITOK) has been broken.
Thousands of callers depend on malloc(M_WAITOK) not returning NULL,
and malloc.9 still documents this behaviour.  You may be thinking of
mbuf allocation.  It is confusingly different, starting with the no-wait
flag being spelled differently (M_NOWAIT).

Bruce


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?20020529212412.U24797-100000>