Boost logo

Boost Users :

Subject: Re: [Boost-users] custom allocators Re:pool_alloc
From: Eric Whitcombe (ericwsf_at_[hidden])
Date: 2010-03-19 15:44:16


I'm sorry but you would have to point me to some sources where you are
getting your info. I can point you to Josuttis "The C++ Standard Library: A
Tutorial and Reference" p 734.

In part about rebind: "This template structure provides the ability that an
allocator may allocate storage of another type indirectly."
This page gives detailed example vis-a-vis std::deque.
I won't quote it at length.
In short rebind allows you to abstract the implementation of allocating the
internal data structures and link it to the allocation of dynamic type of
the element.

----- Original Message -----
From: "Steven Watanabe" <watanabesj_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Friday, March 19, 2010 2:54 PM
Subject: Re: [Boost-users] custom allocators Re:pool_alloc

> AMDG
>
> Eric Whitcombe wrote:
>> Sorry, if this is a little late to be helpful but I thought I'd add this
>> for historical purposes for anyone looking at this thread to deal with
>> their own problem. All STL containers use allocators to allocate and
>> initialize the memory to store the _elements_ in the container not the
>> node structure.
>
> This is not true.
>
>> The containers definition of the data structures that support the
>> implentation details are purely internal. The allocator interface is
>> paramterized on the type of the container element.
>
> All node based containers use rebind to get
> an allocator for the internal node type.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net