Mojo module
memory
Provides memory barrier utilities for preventing compiler optimizations.
This module includes the clobber_memory() function which acts as a memory
fence to prevent the compiler from reordering or eliminating memory operations.
This is essential for accurate benchmarking when memory access patterns need to
be preserved exactly as written.
Functions
-
clobber_memory: Forces all pending memory writes to be flushed to memory.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!