Backup a buffer #69
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The buffer is a storage area and you are not forced to eliminate an entry when retrieving it... the whole concept of the circular buffer is to use a fixed amount of memory to store and retrieve data... now you ask how to duplicate an entire buffer? I fail to see the picture, you are probably looking for a different data structure. |
Beta Was this translation helpful? Give feedback.
The buffer is a storage area and you are not forced to eliminate an entry when retrieving it... the whole concept of the circular buffer is to use a fixed amount of memory to store and retrieve data... now you ask how to duplicate an entire buffer? I fail to see the picture, you are probably looking for a different data structure.
If you really want to do that, just create a second buffer of the same type and capacity, iterate over the "live" buffer and push into the "clone" buffer.... Double the memory use