From owner-freebsd-arch Wed Feb 5 12:34:38 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C00237B406 for ; Wed, 5 Feb 2003 12:34:37 -0800 (PST) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96BBB43F75 for ; Wed, 5 Feb 2003 12:34:34 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by rwcrmhc51.attbi.com (rwcrmhc51) with ESMTP id <2003020520343305100hrv4he>; Wed, 5 Feb 2003 20:34:33 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA98338; Wed, 5 Feb 2003 12:34:33 -0800 (PST) Date: Wed, 5 Feb 2003 12:34:32 -0800 (PST) From: Julian Elischer To: Peter Wemm Cc: Jeff Roberson , Dag-Erling Smorgrav , arch@FreeBSD.ORG Subject: Re: New kernel allocation API In-Reply-To: <20030205201534.4409C2A89E@canning.wemm.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 5 Feb 2003, Peter Wemm wrote: > Julian Elischer wrote: > > > When I've had to do this in the (distant) past, I've stored the variable > size information inside the fixed portion of the structure that was being > allocated.. In other situations situations, I used a second size field > next to where I stored the pointer. This wasn't a great burden. > > Nostalgia note: Anybody remember AllocMem() and FreeMem()? I know it's not a great burdon if you are writing the code. It might be a bigger burdon if you are just working with code you don't fully understand, or don't have full access to. I added (many years ago) enough info to the external mbuf info so that it could cope with this (I don't know if it still does but I did have a field for "allocated buffer size"). > > Cheers, > -Peter > -- > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com > "All of this is for nothing if we don't go to the stars" - JMS/B5 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message