aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-14 05:24:17 +0000
committerIan Lance Taylor <iant@google.com>2007-12-14 05:24:17 +0000
commit6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55 (patch)
treeaa539a8dc67b986680175065607f9f51c471b831 /gold/stringpool.h
parent460c00b558bc0cf4501c514b0ff13c7d48750165 (diff)
downloadgdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.zip
gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.gz
gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.bz2
From Craig Silverstein: size hash tables to avoid resizing.
Diffstat (limited to 'gold/stringpool.h')
-rw-r--r--gold/stringpool.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/stringpool.h b/gold/stringpool.h
index 929b4d1..93e1ec8 100644
--- a/gold/stringpool.h
+++ b/gold/stringpool.h
@@ -88,6 +88,12 @@ class Stringpool_template
void
clear();
+ // Hint to the stringpool class that you intend to insert n additional
+ // elements. The stringpool class can use this info however it likes;
+ // in practice it will resize its internal hashtables to make room.
+ void
+ reserve(unsigned int n);
+
// Indicate that we should not reserve offset 0 to hold the empty
// string when converting the stringpool to a string table. This
// should not be called for a proper ELF SHT_STRTAB section.