From owner-freebsd-bugs Wed May 10 9:12: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by hub.freebsd.org (Postfix) with ESMTP id 2534437B650; Wed, 10 May 2000 09:11:58 -0700 (PDT) (envelope-from rik@cronyx.ru) Received: from cronyx.ru by hanoi.cronyx.ru with ESMTP id UAA09684; (8.9.3/vak/2.1) Wed, 10 May 2000 20:10:33 +0400 (MSD) Message-ID: <39198AA5.1923043A@cronyx.ru> Date: Wed, 10 May 2000 20:13:25 +0400 From: Kurakin Roman Organization: Cronyx X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: ru,en MIME-Version: 1.0 To: dg@root.com Cc: "Justin T. Gibbs" , hoek@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: kern/15763 References: <200005090413.VAA20949@implode.root.com> Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org David Greenman wrote: > >>Synopsis: free() fails on contigmalloc() memory > >> > >>State-Changed-From-To: open->closed > >>State-Changed-By: hoek > >>State-Changed-When: Mon May 8 19:34:32 PDT 2000 > >>State-Changed-Why: > >>Don't do that. The contigmalloc() function is only meant for limited > >>use, typically by drivers at boot time. The free() function is meant > >>to work with malloc() not contigmalloc(). > > > >How are you supposed to release contigmalloc'ed memory when > >a module unloads? This is really a bug. > > You would normally use kmem_free() to free contigmalloc'ed memory. Are you sure that it works fine? I have some doubts that kmem_free is enough. I decided to drop this memory at unload time. 4.0 has this function and it works, so I have no problems with it any more. Kurakin Roman > > > -DG > > David Greenman > Co-founder, The FreeBSD Project - http://www.freebsd.org > Creator of high-performance Internet servers - http://www.terasolutions.com > Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message