From owner-freebsd-hackers Wed Mar 27 16:30: 7 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 8BCF437B417; Wed, 27 Mar 2002 16:29:57 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 6972AAE1C1; Wed, 27 Mar 2002 16:29:57 -0800 (PST) Date: Wed, 27 Mar 2002 16:29:57 -0800 From: Alfred Perlstein To: Jeff Roberson Cc: jeff@freebsd.org, hackers@freebsd.org Subject: Re: uma and double free detection? Message-ID: <20020328002957.GQ93885@elvis.mu.org> References: <20020327203236.GN93885@elvis.mu.org> <20020327171432.U16840-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020327171432.U16840-100000@mail.chesapeake.net> User-Agent: Mutt/1.3.27i 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 * Jeff Roberson [020327 14:16] wrote: > On Wed, 27 Mar 2002, Alfred Perlstein wrote: > > > Can uma diagnose double free's? It doesn't seem to be able to > > under a GENERIC config. :( > > > > Oh! Thanks for pointing this out. Originally it could, but with the per > cpu buckets it lost the ability to until the data was really freed. What > I will do is disable per cpu buckets if INVARIANTS is on. The reason for > this is that you have to lock the zone and look at the slabs to do double > free detection. That's really not a good idea, how is one supposed to debug problems with the per-cpu stuff if INVARIANTS disables them? Why don't you look at how the old malloc(9) did it, it will show you how to do it with minimum performance impact (i think). -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message