This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/18633] resource allocation problem with __gnu_cxx::hash_map
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2004 10:58:05 -0000
- Subject: [Bug libstdc++/18633] resource allocation problem with __gnu_cxx::hash_map
- References: <20041123191609.18633.work@paul.dubuc.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2004-11-26 10:58 -------
Actually, just moving down the resize is not ok, since __n and __first would need
to be recomputed too, with a non-trivial overhead in case of insert. Also, the
memory doubling happens only when one of the thresholds is encountered, not in
the common case. Add to this that these are basically legacy and non-portable
facilities (new ISO-mandated unordered containers will be provided soon). All
in all, better not touching find_or_insert, sorry.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18633