This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Question about allocator design
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: Question about allocator design
- From: "Richard B. Kreckel" <kreckel at ginac dot de>
- Date: Tue, 17 Apr 2001 20:26:20 +0200 (CEST)
- cc: Phil Edwards <pedwards at disaster dot jaj dot com>
- Reply-To: Richard dot Kreckel at Uni-Mainz dot DE
On Mon, 16 Apr 2001, Phil Edwards wrote:
> On Mon, Apr 16, 2001 at 03:15:52PM +0200, Richard B. Kreckel wrote:
> > So I introduced some malloc_allocs to see if the problems go away and this
> > seems indeed to be the case. Next I tried in on a GCC-3 I bootstrapped a
> > few weeks ago and lo and behold, the new libstdc++-v3 does not seem to
> > hold a pool of memory for allocators any more!
>
> Not sure whether you mean the trunk or the branch; they are the same in this
> respect right now, but this comment has been added to the trunk in c++config:
Well, I was referring to the branch. And reading stl_alloc.h also
suggests thread-safety is a reason. I tried that library again and well,
I still see some cases where memory consumption goes way up and stays
where it is, even with libstdc++-v3! It does not appear to be a memleak
since repeating that call hundreds of times does not eat more memory. I
have, however, not found out (yet) wich template instantiations are
responsible for that. Are you definitely sure the behaviour has changed
all over STL or may some containers still be doing the old allocation?!?
Thinking about it I really wonder how the folks at SGI came up with this
idea of never freeing memory till the program stops. It strikes me as
utterly brutal.
Regards
-richy.
--
Richard Kreckel
<Richard.Kreckel@Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>