Date: Tue, 2 Dec 1997 19:22:49 -0500 (EST) Message-Id: <199712030022.TAA02585@delorie.com> From: DJ Delorie To: randym AT acm DOT org CC: djgpp-workers AT delorie DOT com In-reply-to: <3.0.1.32.19971202130439.007ae100@yacker.xiotech.com> (message from Randy Maas on Tue, 02 Dec 1997 13:04:39 -0600) Subject: Re: patch for fsext.h Precedence: bulk > struct { > int fd; > __FSEXT_function* func; > void* data; > }; > > This should be able to fit 340 or so on a single page. I'd say use fd as > the hash key. The big drawback is the penalty for updating and searching > the list, possibly twice. Any idea if the average case under two tables is Better yet, drop the fd member and make an array[256] of them (use fd as the index). 256 fds = 512*4 bytes = 2048, well within a page size. Worst case would be four pages (table spans two pages, lookup functions span two pages) but that's worst case already.