|
Boost : |
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2020-05-23 17:08:23
On 22/05/2020 16:08, Andrey Semashev via Boost wrote:
> One allocation might not be a problem, and small_ring_queue allows to
> avoid even that, if the optimal capacity is known at compile time.
>
> However, std::deque continues to dynamically allocate chunks as you push
> and pop elements, even if the average number of enqueued elements stays
> the same. This is avoided by ring queues.
Independently from a future Boost.RingQueue or integrated into
Boost.CircularBufer (which I think it's be correct module), having a
boost::container::deque that conserves capacity (already allocated
buffers) so that continuous dynamic allocation does not happen is a nice
to have feature.
Best,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk