IT lexicon › Programming › Memory disambiguation

Memory disambiguation

Programming På svenska → Updated: 2026-11-16

CPU technique for predicting whether two memory accesses conflict, allowing out-of-order execution if they're independent.

A CPU with multiple execution units needs to know whether instruction A's store can affect instruction B's load. If they're independent, both can run in parallel; otherwise, order must be preserved. Memory disambiguation uses speculative analysis — typically from address masks or patterns learned from prior runs — to guess that two accesses don't conflict. If the guess is wrong, the later instruction stalls and order is restored.

This is one of several CPU optimizations that hide actual memory ordering behind a layer of shuffled instructions. Without explicit memory barriers, programs with unintended data races can see counterintuitive results.

← Back to the lexicon