This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29433] using boost::MPL requires lots of memory
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2006 12:38:02 -0000
- Subject: [Bug c++/29433] using boost::MPL requires lots of memory
- References: <bug-29433-12712@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from rguenth at gcc dot gnu dot org 2006-11-28 12:38 -------
Most of the memory used is spent in the string pool:
String pool
entries 68980
identifiers 68980 (100.00%)
slots 131072
bytes 1012M (10M overhead)
table size 1024k
coll/search 0.7816
ins/search 0.2876
avg. entry 15394.37 bytes (+/- 68924.74)
longest entry 2130575
if you add -g to the compilation, dwarf2out.c happily xstrdup()s most of
them a few times and memory consumption goes up to 3.9GB.
All the stringpool handling and it's usage by classtype_mangled_name is
not very well optimized for such large strings (after all, we know the
string length there for example).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29433