From owner-freebsd-hackers Thu Oct 11 10:17:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 67F5B37B407 for ; Thu, 11 Oct 2001 10:17:50 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f9BHHfP28087; Thu, 11 Oct 2001 10:17:41 -0700 (PDT) (envelope-from dillon) Date: Thu, 11 Oct 2001 10:17:41 -0700 (PDT) From: Matt Dillon Message-Id: <200110111717.f9BHHfP28087@earth.backplane.com> To: Patrick Cipiere Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: contigfree, free what? References: <200110111710.f9BHAcW24404@ra.udcast.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :We are currently working with FreeBSD 4.3 and we found out that :kldloading/kldunloading modules working with contigmalloc()/contigfree() :like if_xl.ko produces a memory leak. : :This is due to the contigfree() function which seems to uncompletely release :the memory ressource allocated in vm_page_array. : :When contigmalloc() steps in vm_page_array, it does not find back :the pages previously released by contigfree() :The loop vm/vm_page.c is this one: : : for (i = start; i < cnt.v_page_count; i++) { : int pqtype; : phys = VM_PAGE_TO_PHYS(&pga[i]); : pqtype = pga[i].queue - pga[i].pc; : if (pqtype == PQ_FREE : : :It fails on the `pqtype == PQ_FREE' test :and the previously allocated (and supposedly released by contigfree) :pages can't be reallocated. : :Anyone has a patch? : :Thanx, :Patrick. This meshes with a bug report I received a couple of weeks ago, though you provide a great deal more information. I'll take a look at it (if others have a patch and want to jump in, then by all means post away!). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message