This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

startup allocation


g++.eh/badalloc1.C recently began failing in the g++ testsuite.  This
testcase overrides malloc to allocate from a small buffer, and it seems
that the amount of malloc memory needed by libstdc++ startup recently
increased dramatically.  Investigating, I found that iostream
initialization initializes a locale, which initializes the standard
locales, which allocates a string "C", which allocates a 16-byte Rep, which
is allocated out of a 640-byte allocator chunk, which overflows my buffer.

Would it be possible to avoid doing these allocations at startup time,
either by doing them statically or deferring them longer?  The less work
that we end up doing just because we link against libstdc++, the better.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]