Subject: Re: [boost] stack-allocated STL-containers
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-08-13 18:00:37
There was an overlong discussion about this some time ago.
You could look at boost::auto_buffer. I also have a system that does this
using a generalised allocator in the sandbox http://tinyurl.com/o56t5u.
Two immediate issues are alignment and the fact that you are using a
stateful allocator. However, in the case you provide it would work. It's
just not a very interesting case.
On Fri, Aug 14, 2009 at 6:21 AM, Mateusz Loskot <mateusz_at_[hidden]> wrote:
> Stefan Strasser wrote:
> > I recently ran into the problem that a local container on the stack,
> which was
> > likely to be very small, but its size was still not known at
> > consumed a considerable amount of runtime because of
> > [...]
> I'd try to find out if the std::vector of that implementation
> doesn't provide short array optimisation.
> Peraps STLport does, I'm not sure.
> That would solve this issue.
> Best regards,
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk