PDA

View Full Version : Wat Is Buffer And Wat Is The Usage Of It?



RyonanGT
11-24-2003, 02:21 PM
plz help.....!!!!!!

4play
11-24-2003, 02:35 PM
Originally posted by www.hyperdictionary.com
An area of memory used for storing messages. Typically, a buffer will have other attributes such as an input pointer (where new data will be written into the buffer), and output pointer (where the next item will be read from) and/or a count of the space used or free. Buffers are used to decouple processes so that the reader and writer may operate at different speeds or on different sized blocks of data.

There are many different algorithms for using buffers, e.g. first-in first-out (FIFO or shelf), last-in first-out (LIFO or stack), double buffering (allowing one buffer to be read while the other is being written), cyclic buffer (reading or writing past the end wraps around to the beginning).

RyonanGT
11-24-2003, 02:38 PM
thanx man... :D
one more question.....
does it hav any relation with error correction or error prevention??????

4play
11-24-2003, 02:43 PM
buffer overflows.
a buffer is finite so if you try to put too much data into it there will be an overflow. generally the data will wrap around a start from zero again. same kinda principle as a clock when you reach higher then 12:59 it resets back to 0.

erm not sure about error correction and buffers. im sititng here going through hamming code which is related but it makes no mention of buffers.

RyonanGT
11-24-2003, 02:50 PM
u r awesome man....
thanx for the info...
really appreciate it...

shn
11-24-2003, 03:21 PM
If your interested in buffer overflows or how to prevent them from being exploited. Do a search on "smashing the stack" on google.