From 6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 14 Dec 2007 05:24:17 +0000 Subject: From Craig Silverstein: size hash tables to avoid resizing. --- gold/stringpool.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gold/stringpool.h') 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. -- cgit v1.1