Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 2002 16:47:43 -0700 (PDT)
From:      Don Lewis <dl-freebsd@catspoiler.org>
To:        abjenkins@attbi.com
Cc:        joe@tao.org.uk, current@FreeBSD.ORG
Subject:   Re: KSE M-III status & junior hacker project.
Message-ID:  <200207082347.g68Nlhwr002091@gw.catspoiler.org>
In-Reply-To: <200207081928.50162.abjenkins@attbi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On  8 Jul, Anthony Jenkins wrote:

> I've been looking at the pcm code and I can see where it locks, then allocates 
> memory with the M_WAITOK flag thing.  I'm wondering if there's a standard 
> procedure for fixing these... would I just nail down the malloc to a 
> non-sleepable one?

Only if the the code can cope with malloc() failing and returning NULL
if the memory isn't immediately available.  In most cases a better
solution is to allocate the memory before grabbing the lock.


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?200207082347.g68Nlhwr002091>