CONCEPT LIBRARY

Memory safety

Valid memory access and object lifetimes.

Overview

Memory safety prevents invalid memory accesses, such as use after free and out-of-bounds reads. Rust combines statically checked ownership and borrowing with runtime checks where necessary. Safe Rust relies on sound implementations of unsafe code beneath safe interfaces. Memory safety does not imply freedom from memory leaks, deadlocks or logic errors.

Further reading

Related concepts

Related papers

Referenced in issues