bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/2467] "ar q" / ranlib has large memory use (linear in arch


From: dcoutts at gentoo dot org
Subject: [Bug binutils/2467] "ar q" / ranlib has large memory use (linear in archive size)
Date: 17 Mar 2006 15:18:50 -0000

------- Additional Comments From dcoutts at gentoo dot org  2006-03-17 15:18 
-------
After looking at the code a bit more I have these observations:

as we map over each element in the archive, it is the call to:
bfd_check_format (current, bfd_object);
that makes the current bfd swell in memory use. If we close each archive member
bfd after use then the memory use remains constant. However we can't actually
close each archive member since they need to be open for when the archive gets
written. On the other hand writing out the archive doesn't need all the
auxillary information in each bfd that bfd_check_format allocates. If we omit
the loop over archive members entrely then writing the archive doesn't cause a
mamory spike.

So what we need is something to release the auxillary info that gets allocated
for each archive member bfd after we're done with it but without actually
closing the bfds.

Sadly, neither bfd_cache_close nor bfd_free_cached_info serve this purpose.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2467

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]