Boost logo

Boost :

Subject: Re: [boost] [pool2] Requests for comment
From: DUPUIS Etienne (e.dupuis_at_[hidden])
Date: 2012-10-16 03:24:52


Greetings Francisco,

> De la part de Francisco José Tapia
>
> The pool and the suballocator have several things in common , but they are
> differents.
>
> ...
>
> The suballocator run over ANY allocator with the STL allocator interface.
> It don't take care about the kind of allocator or the origin of the memory.
>
> ...
>
> I need the source of the memory, and the pool library is an excellent option. I
> need to study in deep, for to know if the pool have all I need for the next
> extension of the suballocator . If I need something, or have any idea or
> suggestion , I will comment you.
>
> The dispatching of a big number of fixed size elements, have different
> problems that the dispatching of variable size elements.
>
> ...
>

In fact your suballocator is a particular case of pool which
1. Manages only fixed sized elements, hence it is optimized for this usage.
2. Fetches his memory by using another STL allocator.
3. Automatically frees no longer used chunks of memory.

The actual boost::pool does not address your issues as
1. The 'object_pool' implementation is horrendously slow.
2. The memory is fetched from a static custom allocator which has a different API than std::allocator.

The pool2 I am designing will address all issues; I am not finished as I am currently trying to know what users need.

The code I was referring in my original post currently manages fixed sized pool buffers, using a std::allocator as a base. A user supplied policy controls how the pool grows. The pool can be thread safe of not. The policy will also enable the user to control whether or not the pool should release unused chunks of memory. This pool itself will be usable as a std::allocator.

This first pool class will be completed by a second one, dedicated to variable sized buffers.

Hence the new pool2 should fulfill all requirements of your suballocator.

Regards,
Étienne

Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute modification, édition, utilisation ou diffusion non autorisée est interdite. Si vous avez reçu ce message par erreur, merci de nous en avertir immédiatement. ATEME décline toute responsabilité au titre de ce message s'il a été altéré, déformé, falsifié ou encore édité ou diffusé sans autorisation.
This message and any attachments are confidential and intended solely for the addressees. Any unauthorized modification, edition, use or dissemination is prohibited. If you have received this message by mistake, please notify us immediately. ATEME decline all responsibility for this message if it has been altered, deformed, falsified or even edited or disseminated without authorization.

Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk