Memory Model

Noun · Development

Definitions

  1. A formal specification defining how reads and writes to shared memory behave in a concurrent program — which reorderings the compiler and hardware are allowed to perform, and what guarantees (like sequential consistency or acquire-release semantics) are available through atomic operations and synchronization primitives.

    In plain English: The rules a programming language defines for how different threads see each other's changes to shared data, especially when things happen at nearly the same time.

    Example: "The C++ memory model lets you choose between seq_cst for safety and relaxed for performance on that atomic counter."

Related Terms