Re: Custom allocator sample code for vector
From: Alex Vinokur (alexvn_at_big-foot.com)
Date: 08/16/04
- Next message: Steven T. Hatton: "Re: Reasonable expectation: for(it = v.begin(); it != v.end(); it++)"
- Previous message: Steven T. Hatton: "Accessing a protected member of a member of type BaseClass????"
- In reply to: Alex Vinokur: "Re: Custom allocator sample code for vector"
- Next in thread: tom_usenet: "Re: Custom allocator sample code for vector"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 16 Aug 2004 14:25:06 +0300
"Alex Vinokur" <alexvn@big-foot.com> wrote in message news:2ns0hgF3vdnqU1@uni-berlin.de...
>
[snip]
> Here is the Nicolai M. Josuttis' code sample with cosmetic changes added by me to profile the executable:
> http://groups.google.com/groups?threadm=2nrba8F3sq7sU1%40uni-berlin.de
>
> Here are log files for the following compilers
> * GNU g++ : http://groups.google.com/groups?selm=2nrb31F3q19kU1%40uni-berlin.de
[snip]
>
> We can see that
> * GNU g++ 3.3.1 doesn't invoke construct() and destroy();
[snip]
"Matt Austern" <austern@apple.com> wrote in message
http://article.gmane.org/gmane.comp.gcc.libstdc++.devel/9815
> On Jul 19, 2004, at 9:25 AM, pippadav@dei.unipd.it wrote:
>
> > Hi everybody !
> >
> > There's a behaviour in STL allocator I don't understand, I hope
> > somebody can
> > help me...
> >
> > I'm trying to customize an allocator to track the insertion/deletion
> > of objects
> > in a container,
> > decorating the standard allocator functions construct() and destroy().
> >
> > The problem is that it seems that those functions are never called in
> > STL
> > containers, instead
> > a global template function _Construct() (defined in <stl_construct.h>)
> > is
> > called, that is
> > completely unaware of allocators.
>
> This is a bug.
[snip]
See also several relevant threads from news://news.gmane.org/gmane.comp.gcc.libstdc++.devel
The thread titled "Custom allocator for vector and libstdc++-v3"
http://thread.gmane.org/gmane.comp.gcc.libstdc++.devel/10087
The thread titled "allocator construct() / destruct() behaviour..."
http://thread.gmane.org/gmane.comp.gcc.libstdc++.devel/9814
The thread titled "PATCH: use construct and destroy from user-provided allocators"
http://thread.gmane.org/gmane.comp.gcc.libstdc++.devel/9847
--
Alex Vinokur
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
- Next message: Steven T. Hatton: "Re: Reasonable expectation: for(it = v.begin(); it != v.end(); it++)"
- Previous message: Steven T. Hatton: "Accessing a protected member of a member of type BaseClass????"
- In reply to: Alex Vinokur: "Re: Custom allocator sample code for vector"
- Next in thread: tom_usenet: "Re: Custom allocator sample code for vector"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|