This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mapping range of addresses
- From: Robert Dewar <dewar at adacore dot com>
- To: shreyas76 at gmail dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 19 Sep 2005 10:25:05 -0400
- Subject: Re: Mapping range of addresses
- References: <24389fb305091907144aff7f60@mail.gmail.com>
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.