[Development] Proposal for "container-oriented deterministic memory manager"

Phil Bouchard philippeb8 at gmail.com
Fri Jan 6 00:44:01 CET 2017


On 01/05/2017 07:26 AM, Phil Bouchard wrote:
>
> Simon was mentioning that it would be preferable having root_ptr with an
> underlying mechanism to select memory pools based on the type allocated
> or the frequency of the allocation made.  I don't see how it could be
> further optimized.

After reading the following optimized memory pool documentation:
https://github.com/cacay/MemoryPool

I just realized how obvious it is.  You just add some timer to determine 
the frequency, you measure the speed of the allocation requests and you 
"adapt" the memory chunks you allocate that will be later subdivided 
into the sizeof the type of the object.  All of this type-oriented.

So if you allocate 1,000,000 integers a second then larger memory blocks 
of sizeof(int) * 1000000 * CONSTANT will be allocated at once.

I am cross-posting this message with the Boost mailing list because it 
is so evident.


-Phil




More information about the Development mailing list