From owner-freebsd-hackers Thu Oct 9 21:45:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA22896 for hackers-outgoing; Thu, 9 Oct 1997 21:45:04 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA22881 for ; Thu, 9 Oct 1997 21:44:51 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.6/8.8.5) id XAA16818; Thu, 9 Oct 1997 23:44:08 -0500 (EST) From: "John S. Dyson" Message-Id: <199710100444.XAA16818@dyson.iquest.net> Subject: Re: free() in device drivers In-Reply-To: <199710100347.NAA00721@word.smith.net.au> from Mike Smith at "Oct 10, 97 01:17:04 pm" To: mike@smith.net.au (Mike Smith) Date: Thu, 9 Oct 1997 23:44:08 -0500 (EST) Cc: mdean@best.com, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Mike Smith said: > > > > If I do a malloc (p, M_DEVBUF, M_NOWAIT); > > > > then find a problem in my attach routine, can I do a free(p, M_DEVBUF) to > > recover that memory? > > No. In fact, the memory will remain allocated over even cold > reboots, and you will have to open the system, identify which SIMM the > memory was allocated on, remove it and wrap it in aluminium foil for > half an hour to discharge the DRAM capacitors and clear the allocation. > Ahhh... That is where one of my memory leaks is... (:-)). I suggest that a smiley have been used in the previous response :-). -- John dyson@freebsd.org jdyson@nc.com