This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mapping range of addresses


shreyas krishnan wrote:
Hi , I am looking for an efficient data structure to map from a
range of addresses to a single address. As it is used at runtime, I
want it to be as efficient as possible, with perhaps updaing more
important that retreiving. Are there any examples of such data
structure ( and optimized code to use it) in gcc,binutils ?


thanks Shrey

normally one would just use a binary search on a sorted table. You can use a balanced tree to make updating reasonable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]