Re: circular buffer
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Jun 2007 07:28:10 -0700
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
.
- Follow-Ups:
- Re: circular buffer
- From: CBFalconer
- Re: circular buffer
- 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
- circular buffer
- Prev by Date: Re: how hard to program new file explorer app?
- Next by Date: Re: circular buffer
- Previous by thread: Re: circular buffer
- Next by thread: Re: circular buffer
- Index(es):
Relevant Pages
|