liveBook · Manning

Memory safety

Memory safety is the property that a program accesses memory only in valid ways, respecting bounds, allocation, and lifetime rules.

How 3 Manning books explain it

Rust Servers, Services, and Apps

Memory safety is the property that a program cannot perform invalid accesses, use deallocated values, or otherwise violate memory-access rules.

How it is used
Frames memory safety as a Rust benefit for application backends and software infrastructure.
How deep it goes
Identifies memory safety as a distinct property but does not explain its mechanisms in the supplied discussion.
What you can do after
Evaluate Rust’s backend suitability by recognizing memory safety without a garbage collector as a way to prevent several bug classes.

Read how Rust Servers, Services, and Apps explains memory safety →

Refactoring to Rust

Memory safety is the property that software accesses memory only in valid ways, preventing errors such as use-after-free, buffer overflows, and invalid pointer dereferences.

How it is used
Motivates incremental Rust refactoring of existing applications, especially safety-critical C and C++ code.
How deep it goes
Explains ownership and compile-time checks, introduces unsafe operations, and defers detailed ownership discussion.
Examples
Uses C and C++ refactoring and raw-pointer dereferencing to illustrate safety concerns.
What you can do after
Evaluate where Rust can improve memory safety and where unsafe code leaves safety obligations with the developer.

Read how Refactoring to Rust explains memory safety →

Hacking Cryptography

Memory safety is the property that program operations access memory only within valid bounds and lifetimes without invalid aliasing or use-after-release.

How it is used
Frames memory handling as a central secure-implementation concern, especially for cryptographic applications.
How deep it goes
Explains buffer-overflow and overread mechanics, names mitigations, and stops short of full memory-management internals.
Examples
Uses server input overflow, bounded C functions, and the OpenSSL 1.0.1f Heartbleed implementation as concrete examples.
What you can do after
Diagnose buffer-boundary failures and choose bounded APIs, testing, fuzzing, and platform mitigations.

Read how Hacking Cryptography explains memory safety →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.