From owner-freebsd-current Tue Jul 9 6: 3:54 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D2B837B400 for ; Tue, 9 Jul 2002 06:03:52 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51B3243E09 for ; Tue, 9 Jul 2002 06:03:52 -0700 (PDT) (envelope-from abjenkins@attbi.com) Received: from foo ([24.60.235.125]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020709130351.JPFB8262.rwcrmhc52.attbi.com@foo>; Tue, 9 Jul 2002 13:03:51 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Anthony Jenkins To: Don Lewis Subject: Re: KSE M-III status & junior hacker project. Date: Tue, 9 Jul 2002 09:03:04 -0400 User-Agent: KMail/1.4.1 Cc: joe@tao.org.uk, current@FreeBSD.ORG References: <200207082347.g68Nlhwr002091@gw.catspoiler.org> In-Reply-To: <200207082347.g68Nlhwr002091@gw.catspoiler.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207090903.04266.abjenkins@attbi.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday 2002-July-08 19:47, Don Lewis wrote: > 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 ther= e'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. Thanks... I'll take a look at this tonight after work. -- Anthony Jenkins To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message