Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Circular buffer

Also known as: Ring buffer, Cyclic buffer

German: Ringpuffer

In software engineering, a circular buffer is a fixed-size data structure that stores elements in a continuous loop: when the end is reached, writing wraps around to the start, and, depending on the design, the oldest data is either overwritten or new data is rejected when the buffer is full.

  • Software engineering

In one sentence

A circular buffer is a fixed-size buffer whose write position wraps around to the start, often overwriting the oldest data.

Example

A drive keeps the last 1,000 samples of current and speed in a circular buffer; when a fault occurs, the buffer is frozen and uploaded for analysis.

How it applies

  • Engineering: Circular buffers need no dynamic memory allocation and have constant-time operations, which makes them popular in real-time and embedded software, for example for communication queues between an Interrupt service routine (ISR) and a task, or for trace recording.
  • Design: Decide what happens when the buffer is full: overwrite the oldest entries (typical for traces and logs) or refuse new entries (typical for commands, where losing data is not acceptable). Shared buffers between tasks need a safe access scheme.
  • Documentation: Diagnostic and service documentation should state the buffer size, what is recorded and when old data is overwritten. Service staff must know that fault history in a circular buffer may be lost if it is not saved in time.

Circular buffer vs. queue

A queue is the abstract first-in, first-out behavior; a circular buffer is one common way to implement it in fixed memory. An Event queue may be built on a circular buffer.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Knowledge editorial definition, based on embedded and real-time software practice

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!