circular-buffer Questions
3
Solved
I have found pseudo code on how to implement a circular buffer.
// Producer.
while (true) {
/* produce item v */
while ((in+1)%n == out)
/* Wait. */;
b[in] = v;
in = (in + 1) % n
}
// Consum...
Heida asked 19/9, 2011 at 22:0
3
Solved
I wonder is it possible to have a map that would work like boost circular buffer. Meaning it would have limited size and when it would get to its limited size it will start overwriting first insert...
Hydra asked 22/8, 2011 at 20:58
1
Solved
for my game iOS project I need a ring buffer. It should work similar to a queue where elements go out and go in but the total amount of elements in the buffer should stay the same.
I implemented t...
Thumping asked 21/6, 2011 at 11:52
3
Solved
I need a python script implementing a circular buffer for rows in a text file limited to N rows like this:
row 1 -> pop
row 2
row 3
|
|
push -> row N
What's the best solution?
EDIT:
...
Streaming asked 9/6, 2011 at 13:53
3
Solved
I have a high-priority process that needs to pass data to a low-priority process. I've written a basic ring buffer to handle the passing of data:
class RingBuffer {
public:
RingBuffer(int size);...
Danner asked 21/4, 2011 at 15:51
5
Solved
Unlike windows style self explanatory copy/cut/paste commands, I could not understand ring concept in emacs.
Since I don't program very often in emacs, I could have not realized the value of ring ...
Cryosurgery asked 15/10, 2010 at 15:23
3
i need to make a file behave as a circular buffer. From one thread i have to write the data.From another thread i have read from the file. But the size of the file is fixed.
Any idea?
Quentin asked 18/9, 2010 at 13:38
2
Solved
Iterating forward through a circular buffer without using a conditional is easy with the remainder operator...
iterator = (iterator + 1) % buffer_size;
I can't for the life of me figure out the r...
Tippets asked 9/8, 2010 at 5:9
3
Solved
I'm working on a small concept project in Haskell which requires a circular buffer. I've managed to create a buffer using arrays which has O(1) rotation, but of course requires O(N) for insertion/d...
Claudeclaudel asked 8/2, 2010 at 16:12
3
Solved
I checked this question, but it's not what I'm looking for.
I'm trying to figure out how to cap a log file's size (say, 10MB), and as soon as it's hit, either:
start writing to the beginning, r...
Jacobjacoba asked 24/11, 2009 at 8:25
5
Solved
I need to store items of varying length in a circular queue in a flash chip. Each item will have its encapsulation so I can figure out how big it is and where the next item begins. When there are e...
Jame asked 3/11, 2009 at 18:25
© 2022 - 2024 — McMap. All rights reserved.