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] | |
Hi everyone,
earlier today (exactly while I was looking more into Carlo message) Michael sent me this testcase, distilled from KDE arts:
#include <string> #include <list> using namespace std; static list<string> modulePath; int main() { modulePath.push_back("hallo"); return 0; }
Therefore, no special settings are needed (e.g., per_type_pools) to show that something is still not ok with ~__pool. I'm attaching below valgrind's output for a --enable-__cxa_atexit build (removing it avoids, as expected, all the errors).
Frankly, I'm wondering whether we really, *really*, /really/ need to explicitly deallocate the pools instead of demanding the work to the OS: why the original SGI/HP allocator didn't do that?? Perhaps Matt could help here??
There's not very much to say. (But if you want *really* expert opinion you should ask Hans Boehm, not me. This is an area where the HP and SGI implementations were completely different; Hans rewrote memory allocation from scratch.)
It's pretty much what you already said: nobody could think of a good reason to deallocate the pool explicitly, since it would only happen at the end of the program and at that point the OS would reclaim all the storage anyway. All you'll be doing is dirtying pages and making program exit slower, so why bother?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |