Boost logo

Boost :

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


> I don't make games always like in traditional industry, where both object
> pools and small allocation pools are used heavily (and arena too).
> I mostly use only object pools in my own project, for some game-specific
> state objects.
> Last week I finished implementing a template factory class (not really generic
> though) that have the following features:
> 1. it have a "pool" of objects, meaning it have to be stable (objects must not
> move in memory).
> 2. it provide a way to go through all the elements very fast 3. it provide an
> "index" by "id" of objects Basically this means I wanted a std::vector of
> elements, which should be reserved and would not go higher than a specific
> size, plus a map<id, element*> for the index (that is not interesting here).
> The problem was that I didn't want to limit the number of elements, to allow
> the same code to be usable by the in-game editor, meaning I cannot really fix
> a maximum of elements before having edited some "map" of the game.
> (maybe I'll fix later, but I don't want to for some reasons).
> Having done the same system before with boost::pool (from 1.44 version I
> think) and I was not happy with the performances, I didn't bother trying
> using it.

If I understand correctly, your 'pool' manages live objects, i.e. objects that are currently in use by the application. I was rather working on a pool which manages memory for object allocation; i.e. as soon as an object is released back to the pool, it's content is destroyed and lost; hence there is no way to index elements released to the pool as we can think of them as if they no longer exists.


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, gregod at, cpdaniel at, john at