From owner-freebsd-questions@FreeBSD.ORG Mon Aug 8 20:14:28 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF51C16A41F for ; Mon, 8 Aug 2005 20:14:28 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81BDE43D48 for ; Mon, 8 Aug 2005 20:14:28 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j78KERnp026912 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Mon, 8 Aug 2005 13:14:27 -0700 Message-Id: <6.1.0.6.2.20050808125715.122cc7d0@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Mon, 08 Aug 2005 13:14:35 -0700 To: Munjal Kapadia , freebsd-questions@freebsd.org From: Glenn Dawson In-Reply-To: <20050808162727.83178.qmail@web54708.mail.yahoo.com> References: <20050808162727.83178.qmail@web54708.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: Subject: Re: creation and deletion of ramdisk does not free up kernel address space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 20:14:28 -0000 At 09:27 AM 8/8/2005, Munjal Kapadia wrote: >Hi all, > >I do the following: > >1. I create a ramdisk the following way: >mdconfig -a -t malloc -o reserve -s 128M > >2. then I delete the ramdisk: >mdconfig -d -u md3 > >3. next, I load a kmod. But I notice that the address >the kmod gets loaded is off by 0x8000000 (= 128M) as >compared to the address that the kmod gets loaded when >i do not create and delete the ramdisk. > >Thus, without the creation and deletion of ramdisk, if >kmod loads at 0x822e7000, then with the creation and >deletion of ramdisk, the kmod loads at 0x8a2e7000 > > >Can someone please tell me why? (Someone jump in here and correct me if I'm wrong) When you un-configure the RAM disk, the memory it was using get's put on the inactive pages list. From there, when a page is clean it can be moved to the cache list, and from there it can be moved to the free list and reallocated to another process. So, allocating some memory and then freeing it doesn't make it available to reallocated right away. -Glenn >Thanks >Munjal > > > > >____________________________________________________ >Start your day with Yahoo! - make it your home page >http://www.yahoo.com/r/hs > >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"