diff options
author | Ian Lance Taylor <iant@google.com> | 2007-12-14 05:24:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-12-14 05:24:17 +0000 |
commit | 6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55 (patch) | |
tree | aa539a8dc67b986680175065607f9f51c471b831 /gold/symtab.cc | |
parent | 460c00b558bc0cf4501c514b0ff13c7d48750165 (diff) | |
download | gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.zip gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.gz gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.bz2 |
From Craig Silverstein: size hash tables to avoid resizing.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 9187f32..770628c 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -295,10 +295,11 @@ Symbol::final_value_is_known() const // Class Symbol_table. -Symbol_table::Symbol_table() - : saw_undefined_(0), offset_(0), table_(), namepool_(), +Symbol_table::Symbol_table(unsigned int count) + : saw_undefined_(0), offset_(0), table_(count), namepool_(), forwarders_(), commons_(), warnings_() { + namepool_.reserve(count); } Symbol_table::~Symbol_table() |