Boost logo

Boost :

Subject: Re: [boost] [pool2] Requests for comment
From: DUPUIS Etienne (e.dupuis_at_[hidden])
Date: 2012-10-18 02:27:25


Greetings,

> De la part de Cory Nelson
> Envoyé : mardi 16 octobre 2012 16:28
>
> - An arena allocator: to allocate any-sized objects from, but only deallocate all
> at once.

I will take care to have this use case optimized as you are not the first one to request it.

>
> - Allow an arena/pool allocator to draw its storage from another pool.

It will be the case.

> - Configurable allocation efficiency. For instance, boost::pool will find the
> least common multiple of page size and block size, which can result in huge
> allocations in the name of not wasting any memory. Sometimes I might want
> this, other times I'd be OK wasting a handful of bytes out of every page if it
> means more reasonably sized initial allocations.

The 'least common multiple problem' present in boost::pool was fixed in a recent version of boost. I hopefully will not repeat the same error!

>
> - Configurable alignment. Very useful for eg. AVX instructions, which can
> require 32-byte data alignment.

I agree; it is a pain that Microsoft's malloc() function still returns 8-byte aligned buffers.

>
> - (Maybe) If you've got an object allocator, have a policy setting that disables
> calling destructors. Not sure if this belongs in the library due to shooting-
> own-foot-off potential, but there have been instances where I don't care
> about destructors because I know all the resources are associated with the
> pool. In this case an object allocator would become a glorified wrapper for
> placement new.
>

Let me complete the API and implementation before looking into these more 'exotic' features...

Thanks for your comments,
É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