View Single Post
Old Feb 12th, 2008, 8:27 AM   #2
Narue
Professional Programmer
 
Narue's Avatar
 
Join Date: Sep 2005
Posts: 419
Rep Power: 4 Narue is on a distinguished road
Re: an efficient way to store/lookup memory addresses?

>hash table, but the range of possible memory addresses is so big
You're confusing a basic lookup table with a hash table. A hash table is designed so that you don't need to provide slots for the entire range of keys. A hash function takes a key and turns it into a suitable index into the table, so the size of the table is only related to the number of expected keys, not the expected range of keys.

>Does anyone have any suggestions to this problem?
I'd say go with a hash table unless there are other restrictions that you haven't mentioned.
__________________
Even if the voices aren't real, they have some pretty good ideas.
Narue is offline   Reply With Quote