buffer
Factor handbook » The language » Collections » Locked I/O buffers

Next:<buffer> ( n -- buffer )


Vocabulary
io.buffers

Class description
The class of I/O buffers, which resemble FIFO queues, but are optimized for holding bytes, are have underlying storage allocated at a fixed address. Buffers must be de-allocated manually. It has the following slots:
sizeThe total size, in bytes, of the buffer
ptrThe c-ptr memory where data is stored
fillThe fill pointer, a write index where new data is added
posThe position, a read index where data is consumed


Definition


Methods