[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crippling change in ld memory/cpu consumption in v2.12/v2.13
From: |
Alan Modra |
Subject: |
Re: Crippling change in ld memory/cpu consumption in v2.12/v2.13 |
Date: |
Sat, 5 Oct 2002 15:31:58 +0930 |
User-agent: |
Mutt/1.2.5i |
On Fri, Oct 04, 2002 at 03:53:31PM -0500, Marc Paterno wrote:
> [2] ld v2.11 uses about 4.2 kbytes memory per object file; ld v2.12
> uses about 26 kbytes memory per object file.
Hmm, the section hash table, which uses a default size of 4051, will
account for 16k or so of extra memory per object. The following
patch should lop off 15k per object from your figures.
* opncls.c (_bfd_new_bfd): Use a smaller section hash table.
Index: bfd/opncls.c
===================================================================
RCS file: /cvs/src/src/bfd/opncls.c,v
retrieving revision 1.10
diff -u -p -r1.10 opncls.c
--- bfd/opncls.c 17 Jun 2002 02:33:42 -0000 1.10
+++ bfd/opncls.c 5 Oct 2002 05:52:37 -0000
@@ -63,7 +63,9 @@ _bfd_new_bfd ()
nbfd->direction = no_direction;
nbfd->iostream = NULL;
nbfd->where = 0;
- if (!bfd_hash_table_init (&nbfd->section_htab, bfd_section_hash_newfunc))
+ if (!bfd_hash_table_init_n (&nbfd->section_htab,
+ bfd_section_hash_newfunc,
+ 251))
{
free (nbfd);
return NULL;
--
Alan Modra
IBM OzLabs - Linux Technology Centre