Re: 64-bit fun with cache.c

Matthew Dempsky <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On Thu, Jan 22, 2009 at 6:20 PM, Mark Johnson <[email protected]> wrote:
> Has anybody successfully hacked cache.c for 64-bit operation?

I have a patch for this here:

http://shinobi.dempsky.org/~matthew/patches/djbdns-cache64.patch

It uses 8-byte links and 2-byte key and data lengths (instead of
4-bytes for each), so the per entry overhead remains the same as stock
djbdns.  Doubling the size of the links does however halve the number
of available hash buckets (you can change the ">> 5" to ">> 4" in
cache_init.c to keep the same number of hash buckets at the expense of
increased memory overhead).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.