Term of the Moment

conversational interface


Look Up Another Term


Definition: buffer


A reserved segment of memory (RAM) within a program that is used to hold the data being processed. Buffers are set up in every program to hold data coming in and going out. In a video streaming application, the program uses buffers to store an advance supply of video data to compensate for momentary delays. See anatomy of a program.

Applications may be able to allocate and deallocate buffers from the general memory pool. In a printer and other peripherals, fixed buffers provide temporary storage for data passing through. See buffering, double buffering, buffer overflow, buffer flush and bucket.




Storage/RAM Interaction
Instructions and data come from storage or the network, and the interplay between storage and RAM (memory) is how computers, tablets and smartphones work. The data buffers in the program hold the data being processed. See stored program concept and 3 C's.




Actual Buffer Definitions
The following examples are lines of code in C that define input and output buffers within the program. Char creates a buffer holding alphanumeric characters, and long defines an integer. INbuff and OUTbuff are made-up names. The /* and */ are comments. See C and integer.

 char INbuff[30000];  /* input buffer  */
 char *INptr;         /* pointer       */
 char OUTbuff[25000]; /* output buffer */
 char *OUTptr;        /* pointer       */
 long OUTbuffCount;   /* counter       */