|
Boost : |
Subject: Re: [boost] Idea: Boost.Allocator
From: Roland Bock (rbock_at_[hidden])
Date: 2010-04-17 12:07:56
joel falcou wrote:
> I recently had to use Boost Iterator Facade and its relatives and
> found the idea great.
> It occured to me whiel lookign at my X different, hand written
> allocaotrs for various project
> that maybe such a system for writing std allocator could be great.
> Buildign a new allcoator will
> just be impelemnt some allocator_facade<> adn fill some small scale
> methods.
>
> Moreover, it could be the opportunity to add new allocator concept
> like allocator supporting resize
> calls, allcoator with state, allcoator with a allocated() method
> etc... and reality-check them in the boost
> framework.
>
> How does it sounds ?
>
Sounds great!
I've had the same experience. Writing an iterator using the iterator
facade is fun. You can concentrate on the essentials. Writing an
allocator, on the other hand, you write so much additional stuff. I have
an allocator that uses mmap for each allocation. The file has little
over 100 lines. But only two of them are actually doing something. The
rest is just stuff required for stl allocators...
So, yeah, an allocator facade would be cool!
Regards,
Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk