[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hash table based symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix sy
Re: Hash table based symbol lookup (was: Re: [Qemu-devel] [PATCH] Fix symbol lookup for mips64* targets)
Mon, 6 Oct 2008 18:28:41 +0200
On Mon, Oct 6, 2008 at 6:11 PM, Blue Swirl <address@hidden> wrote:
> I hope I'm wrong, but it looks like in the worst case, for each byte
> that the symbol covers, this implementation can allocate a structure
> of tens of bytes in size. I wonder what the symbols of 1.5MB
> openbios-sparc64 would take.
No, you're right: for each byte of a function a structure of about
5 * ptr size is allocated. In your case, that'd be about 60 MB.
It's bad and can probably be reduced. But just try to run in
debug mode (-d) any application that has thousands of
symbols and you'll soon see you have to disable symbol
lookup as its complexity is linear.
I can reduce memory consumption but its size will still be a
multiple of the text segment size.