Re: circular buffer



CBFalconer <cbfalconer@xxxxxxxxx> writes:

Roman Mashak wrote:

... snip ...

I seem to realize your point. The linked list of FIFO nodes lets
us to have 'rubber' queue, of flexible size. But then we don't
have markers of head and tail, what to do with that?

For a FIFO you don't need both. Just keep a pointer to the tail.
One step malloc and add item; one step extract item, use and free.

FIFO == queue
FIFO != stack
LIFO == stack
--
Ben Pfaff
http://benpfaff.org
.



Relevant Pages

  • Re: what is a stack
    ... There's FILO and FIFO, they're both implemented as a regular old array (at ... Consider a stack of plates in a cafeteria, ... aka a queue. ...
    (comp.lang.java.programmer)
  • Re: Block-ram FIFO in Xilinx
    ... In a BlockRAM implementation, this does not make any sense, for width ... Remember, excessive depth or width has no impact, as long as the FIFO ... reliable generation of the Full and Empty flags at high clock rates. ... I would like to use the queue with different sizes of the data bus. ...
    (comp.arch.fpga)
  • Re: Block-ram FIFO in Xilinx
    ... Also Din and Dout have the same width. ... reliable generation of the Full and Empty flags at high clock rates. ... I have generated a block-ram based FIFO queue (2 independent clocks, ... I would like to use the queue with different sizes of the data bus. ...
    (comp.arch.fpga)
  • Re: Interlocked Singly Linked Lists (for Ben or anyone else).
    ... in regards to a FIFO queue design. ... We were discussing a multiple writer, single consumer queue. ... writers each use the InterlockedPushEntrySList function, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: FIFO lost on Critical Section
    ... CriticalSection object I need a way to find another way to achieve that ... These events must be handled in the order coming off of the iocp queue. ... is part of each session object. ... waiting in FIFO order with this scenario. ...
    (microsoft.public.win32.programmer.kernel)