http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57440

--- Comment #6 from DrD <demonskull1 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #4)
> If my guess is right you should be able to reproduce the unbounded memory
> usage with this:
> 
> #include <future>
> 
> int f() { return 0; }
> 
> int main()
> {
>     for (int i=0; i < 100000; ++i)
>         std::async(f).get();
> }
> 
> 
> And you should not see it happen with this:
> 
> #define _GTHREAD_USE_MUTEX_INIT_FUNC
> #define _GTHREAD_USE_COND_INIT_FUNC
> 
> #include <future>
> 
> int f() { return 0; }
> 
> int main()
> {
>     for (int i=0; i < 100000; ++i)
>         std::async(f).get();
> }
> 
> Please check and update the bug report, thanks.

Hi Jonathan,

Thanks for your help. I just tried this code and the memory problem is there
with and without the #define lines.

I haven't managed to get this bug tested on Windows by anyone else yet. I have
tried in two different computers, though (not enough, I think).

Any suggestions?

Reply via email to