Memory model

Use this hub to reason about memory visibility and ownership in modern C++. Start from language guarantees, then connect them to atomics, fences, and allocator/resource APIs. The goal is a practical model for writing lock-free and lock-based code safely.

# Mental Model Diagram

Thread Ax.store(1, relaxed)y.store(1, release)Thread Bif (y.load(acquire) == 1)r = x.load(relaxed)release/acquire synchronizes-withhappens-before => x write is visible to B

Key idea: release/acquire creates a synchronization edge; synchronization contributes to happens-before; happens-before constrains what reads may observe.

# Language Semantics

# Ownership and Smart Pointers

# Allocation and Resources

# Concurrency-Safe Memory Ordering

# Fast Entry Points