Ring Buffer
The Memento ring buffer Common memory space reserved by the Memento driver on the computer, in which the Memento producers write event data. This is also called the Memento storage. is an area of the Host PC memory where the Memento messages are written by the producers.
The ring buffer:
● | has a fixed capacity of 524.288 (512 K) message slots of 64 bytes each. |
● | is managed as a "ring": a new message replaces the oldest one when it becomes full. |

To optimize the storage and the throughput efficiencies of the ring buffer, Memento messages issued by Euresys drivers or libraries are stored in a compact form.
A compacted message without arguments occupies only a single 64-byte memory slot in the ring buffer. When the message has arguments, it requires additional memory slots.
The original messages are reconstructed by the Memento application.
Messages issued by user applications are not compacted and thus require more space in the ring buffer.

The Memento driver assigns a sequential number to every message entering the Memento ring buffer.
The sequential number is a 64-bit positive integer number that increments by 1 on every message input. The sequential number is not reset every boot session.
The sequential number unambiguously identifies a Memento message in the whole message history of a host PC.

The Memento driver maintains a synchronized copy of the ring buffer on disk.
This allows the state and the content of the ring buffer to be restored at the next boot session after a shutdown.
This mechanism operates correctly when the current session terminates normally. If the current session terminates with a "blue screen", or if the reset button is pushed, or if the power supply is removed, the ring buffer data is appended to the crash dump file.