Date: Fri, 19 Dec 1997 01:31:43 +1100 (EDT) From: Darren Reed <avalon@coombs.anu.edu.au> To: gurney_j@resnet.uoregon.edu Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: converting drivers to dynamic memory... Message-ID: <199712181431.GAA22000@hub.freebsd.org> In-Reply-To: <19971218053840.15389@hydrogen.nike.efn.org> from "John-Mark Gurney" at Dec 18, 97 05:38:40 am
next in thread | previous in thread | raw e-mail | index | archive | help
In some mail from John-Mark Gurney, sie said: > > > Hmmm. So how exactly does the B-tree solve the problem ? You're > > allocating > > the dynamic data and storing it on the B-Tree and then have to look > > it up by > > searching the B-tree ? Aren't there better ways of allocating data > > and then > > looking up where it is (what about asking the driver itself) ? > > correct.. this is EXACTLY what the code does.. the problem is that > right now the data is stored in a static table, because of this, you > can't just say, hey, I need another instance of you to attach to this > card... we could even go with a small array of pointers that gets > realloced/resized each time a driver gets attached... (which might be > better, I happen to have just finished testing the btree code, so that > influenced my choice.. :) ).. Now I've got more clues so I can understand where you're going with all of this :) Well, FWIW, Solaris2 does the "extra pointer" thing in its DDI :) However, if you are using multiple instances, you do need to keep track of which is which (guess you could use B-Trees for this :) yourself. Their function call interface consists of over 120 functions which support using the extra pointer (they call their void * type dev_info_t). Hmmm, on second thoughts maybe instead of option 1 and option 2, option 2 should be phase 1 and option 1 should be phase 2 ? :-) Darren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712181431.GAA22000>