Boost logo

Boost :

Subject: Re: [boost] Cooperative Multi-Tasking
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-04 08:00:47


Daniel Larimer wrote:

> It seems like it should be possible to implement a "smart stack
> allocation" scheme where new/delete are overloaded for some template type
> like
>
> sstack<my_data> v1;
> ...
> In theory you could get most of the speed advantages of stack-based
> allocation and yet offload "big objects" to "heap" without having to worry
> about expensive malloc/free calls except when the sstack<> detects that it
> needs to expand.

You are looking for Thorsten's autobuffer?

http://www.cs.aau.dk/~nesotto/boost/auto_buffer.zip

Cheers,

Rutger


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk