Term of the Moment

flash memory

Look Up Another Term

Definition: buffer

A reserved segment of memory 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 streaming video application, the program uses buffers to store an advance supply of video data to compensate for momentary delays.

In a computer, each application can allocate and deallocate its 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.

The following lines of code show how buffers are defined in C. The /* and */ mark the comments, and char and long are elements of the language. INbuff is a made-up name that refers to a 30,000-byte buffer reserved for reading data. See C.

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