This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: RFC: partial symbol table address range generalization



> The question is, how can you represent this in an obstack-friendly
> way?  The obvious representation of an addrmap is a sorted array, with
> a gap for insertion, but obstacks don't like arrays that expand
> occasionally.  A doubling algorithm can guarantee that the waste is
> merely proportional to the final size, but that's kind of crummy.  A
> binary tree works better, but you spend a lot of memory on child
> links; we wouldn't want to use an addrmap to store line number info if
> it took twenty bytes per line (currently it takes only twelve) (both
> assuming a 64-bit CORE_ADDR and 32-bit pointers and ints).

You mean a b-tree?

Andrew



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