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]

Re: Memory leak in ios.cc:326


>> While testing libcwd with g++-3.3, I run into a
>> possible memory leak at ios.cc:326:

> This may or may not be related, but I'm also seeing what
> appears to be a memory leak with the 3.3 libstdc++:
> the thread3.cc test case times out, and while looking at
> the process while it is running, it's RSS continually
> grows until the machine start swapping and everything
> gets slow (which is why the case times out eventually). 
>
> Seeing as that test case basically only does this
> (in two threads in parallel):
>
>  for (int i = 0; i < max_loop_count; i++)
>     std::ostringstream oss;
>
> I don't really see why it should need hundreds of
> megabytes of memory ...

I have my hands full at the moment, but I wanted to ACK this message.

At the time the 6 threaded C++ tests were installed, I personally
checked all of them to ensure that there were zero systemic memory
leaks on (at least) i386-*-freebsd*.  If you are seeing a leak on a
machine, then it is either a general regression or per-port
regression.  Given the description, I'd call it rather major.  I've
been seeing time outs on some of the threaded tests on my local
machine but I thought it correlated to the switch to generic atomics
for "pure" i386.

If you file a PR and assign it to me, then it will get looked at but
perhaps not before 3.3 is released.

Regards,
Loren


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