T
toton
Hi,
I am looking for a circular buffer solution ( a fixed buffer) , where
the elements can be pushed back & removed front. It looks stl deque
can be a solution. my question is,
1) circular buffer is random access? (i.e implemented over array and
not linked list)
2) if I reserve the required space & do push_back & remove_front so
that total memory doesn't exceed the reserved amount, will the internal
pointers will wrap, or the memory will physically move?
3) if it physically move, any stl container for a circular buffer
exists (i need a resize option also) ?
4) if memory don't physically move, i.e can implement a circular
buffer, what is the result of resize with lesser size? will it remove
the oldest push backs, or from the end of memory?
thanks
I am looking for a circular buffer solution ( a fixed buffer) , where
the elements can be pushed back & removed front. It looks stl deque
can be a solution. my question is,
1) circular buffer is random access? (i.e implemented over array and
not linked list)
2) if I reserve the required space & do push_back & remove_front so
that total memory doesn't exceed the reserved amount, will the internal
pointers will wrap, or the memory will physically move?
3) if it physically move, any stl container for a circular buffer
exists (i need a resize option also) ?
4) if memory don't physically move, i.e can implement a circular
buffer, what is the result of resize with lesser size? will it remove
the oldest push backs, or from the end of memory?
thanks