circular-buffer Questions

1

I have a single UDP thread which reads multiple datagrams through recvmmsg system call from different multiplexed streams and pushes them in different circular/ring buffers. These ring buffers are ...
Velvetvelveteen asked 14/3, 2016 at 17:33

1

Just messing about here, with circular buffers. Is this a sensible implementation or is there a faster/more reliable way to skin this cat? class CircularBuffer[T](size: Int)(implicit mf: Manifest[...
Nightwear asked 30/4, 2013 at 16:26

2

Solved

I'm writing a Linux character driver which can print system logs in user space. Just as the command 'dmesg' does. I've learned that all the log that we print with 'printk' will be sent to a space ...
Normand asked 2/3, 2012 at 12:57

1

What is the difference between a Ring Buffer and a Circular Linked List? What purpose does Ring Buffer serve that Circular Linked List cannot or vice versa?
Crumley asked 20/8, 2015 at 4:44

1

Solved

I am investigating LMAX Disruptor's source code, and I came into RingBuffer abstract class. Why are there exactly 7 long fields (p1 ... p7) in RingBufferPad ? Here is actual code : https://github...
Wiley asked 12/8, 2015 at 13:34

1

Solved

I am looking for a library which allows to get a circular buffer on disk. In Boost there is something similar, but it is an in memory based container: circular_buffer.
Battlement asked 25/3, 2015 at 14:33

2

Solved

I have data that is arranged in a ring structure (or circular buffer), that is it can be expressed as sequences that cycle: ...-1-2-3-4-5-1-2-3-.... See this picture to get an idea of a 5-part ring...
Concubinage asked 30/7, 2014 at 6:35

4

Solved

I'm developing a client which will receive the [EEG] data over tcp and write it to the ring buffer. I thought it can be very convenient to have the buffer as a ctypes or numpy array because it's po...
Egesta asked 18/1, 2012 at 11:3

4

Solved

I see a lot of templates and complicated data structures for implementing a circular buffer. How do I code a simple integer circular buffer for 5 numbers? I'm thinking in C is the most straight...
Bindweed asked 1/9, 2010 at 20:34

2

What is the best way to search in a circular array? Example 1 array : 45 67 44 11 49 4 56 12 39 90 circular array 11, 49, 4, 56, 12, 39, 90, 45, 67 Is Binary search the right approach to start ...
Choong asked 8/10, 2011 at 0:25

2

Solved

I have multiple threads that need to consume data from a TCP stream. I wish to use a circular buffer/queue in shared memory to read from the TCP socket. The TCP receive will write directly to the c...
Calvincalvina asked 2/7, 2012 at 14:16

1

How to find the number of lexicographically minimal string rotation? For example: S = abab, N = 2 S = abca, N = 1 S = aaaa, N = 4 I tried Duval's algorithm, it works very long. The string leng...
Georgetown asked 9/1, 2014 at 16:41

1

I'm solving two feeds arbitrate problem of FAST protocol. Please don't worry if you not familar with it, my question is pretty general actually. But i'm adding problem description for those who int...
Baez asked 24/4, 2013 at 21:23

1

Solved

Here is an excerpt from the book "Operating System Concepts" 7th Edition Galvin,Gagne Chapter 3 from the hard-copy itself : The following variables reside in a region of memory shared by the pro...
Grassi asked 21/4, 2013 at 7:9

2

I am looking for ideas for a receive buffer for a small application dealing with 15 byte packets at 921.6Kbaud over rs485. I am thinking of using a circular buffer as the interface between the UART...
Fledge asked 25/7, 2011 at 21:23

2

I'm writing embedded code for STM32F3 mc (STM32F3-Discovery). I need to output some data to UART and I'm using DMA for this as this allows me to concentrate on sensors reading and data processing r...
Circumlocution asked 17/2, 2013 at 21:31

1

There is an article at: http://lwn.net/Articles/378262/ that describes the Linux kernels circular buffer implementation. I have some questions: Here is the "producer": spin_lock(&producer_loc...
Iaria asked 17/1, 2013 at 16:8

1

Solved

Given the desire to abstract the structure of a circular buffer from its content, and starting from the following code segments (courtesy of this wikipedia entry): typedef struct { int value; } ...
Choiseul asked 29/11, 2012 at 2:44

5

Solved

I am working in .Net environment using C#. I need some alternative for the Stack data structure. Some kind of bound stack. The quantity of elements in the collection shouldn't exceed some fixed spe...
Swag asked 15/2, 2011 at 11:45

2

Solved

I am looking for a ring buffer implementation (or pseudocode) in C with the following characteristics: multiple producer single consumer pattern (MPSC) consumer blocks on empty producers block on...

3

Solved

Today I've seen some references to tying the knot and circular data structures. I've been out reading some answers, and the solutions seem to involve using a ref to point back to the head of the li...
Ilocano asked 19/7, 2012 at 19:36

1

Why must a ring buffer size be a power of 2?
Bagwig asked 10/5, 2012 at 4:38

3

Solved

I'm trying to implement a circular buffer for my program. The buffer is used to share data between two threads as shown below. I use OpenCV to grab video frames from camera (Thread 1). Then I would...
Photolithography asked 27/2, 2012 at 21:51

1

Solved

I'm looking for the best way (if any...) to capture continuous video to a circular buffer on the SD card, allowing the user to capture events after they have happened. The standard video recording...

8

I'm implementing a sliding window over a stream of events, in Java. So I want a data structure which allows me to do the following: add to the end of the data structure when new events occur; rem...
Vitale asked 5/11, 2009 at 18:26

© 2022 - 2024 — McMap. All rights reserved.