This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/57440] Memory usage with future and std containers


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


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