From owner-freebsd-arch Thu May 24 3: 4:47 2001 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 03D9437B422 for ; Thu, 24 May 2001 03:04:44 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 152rz1-0008AQ-0Y; Thu, 24 May 2001 11:04:43 +0100 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id f4OA3R758856; Thu, 24 May 2001 11:03:27 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Thu, 24 May 2001 11:03:27 +0100 (BST) From: Doug Rabson To: Brian Somers Cc: Garrett Wollman , Subject: Re: RFC: unit_list routines In-Reply-To: <200105231944.f4NJiXF09637@hak.lan.Awfulhak.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, 23 May 2001, Brian Somers wrote: > > > > Using bits when there are large numbers of units gets awkward. > > > > > > Just wrap it in macros. I almost posted an implementation with my > > > last message, but decided that since it was so trivial it would be > > > almost insulting for me to do so. > > > > Not true - I'm too thick skinned to be insulted :oI > > > > I'll look at a macro implementation. > > Ok, I've thought about this :-/ I don't think it's practical to > do this with bits if someone does > > # ppp -unit 16777215 > > I then have to go off and allocate an array of 0x7fffff bytes just to > record the fact that someone's using a silly unit number. > > I think this must be done as a sparce set of ranges.... ie, my > original idea seems to still stand. The resource manager implementation would handle this efficiently. It is pretty good at managing large sparse ranges (such as device memory maps). -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message