This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/57440] Memory usage with future and std containers
- From: "demonskull1 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 May 2013 17:18:12 +0000
- Subject: [Bug libstdc++/57440] Memory usage with future and std containers
- Auto-submitted: auto-generated
- References: <bug-57440-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57440
--- Comment #5 from DrD <demonskull1 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #3)
> Also I can't reproduce this on GNU/Linux, the memory usage is bounded as
> expected.
>
> I'm surprised this even compiles with Mingw, are you using Mingw-w64 with
> libpthread-win32? Since it seems to be platform-specific it could be a
> resource leak of mutexes or condition variables, so my wild guess is that
> libpthread-win32 requires pthread_mutex_destroy or pthread_cond_destroy to
> be used.
>
> Does it make any difference if you add these to the very top of the source
> file, before including any headers?
>
> #define _GTHREAD_USE_MUTEX_INIT_FUNC
> #define _GTHREAD_USE_COND_INIT_FUNC
It does compile in MinGw. Unfortunately the two #define lines don't help
either.
I forgot to mention that I had already been warned that the test code works OK
in Linux, see:
http://stackoverflow.com/questions/16489389/memory-usage-with-future-and-containers-in-qt-mingw