Re: circular buffer
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Thu, 14 Jun 2007 11:48:39 -0400
Ben Pfaff wrote:
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
Woops. I knew all that. Just got carried away :-)
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com
.
- References:
- circular buffer
- From: Roman Mashak
- Re: circular buffer
- From: Ben Bacarisse
- Re: circular buffer
- From: Roman Mashak
- Re: circular buffer
- From: Richard Heathfield
- Re: circular buffer
- From: Roman Mashak
- Re: circular buffer
- From: CBFalconer
- Re: circular buffer
- From: Ben Pfaff
- circular buffer
- Prev by Date: Re: circular buffer
- Next by Date: Re: circular buffer
- Previous by thread: Re: circular buffer
- Next by thread: Re: circular buffer
- Index(es):
Relevant Pages
|