liveBook · Manning

Memory safety

Memory safety is the property that a program accesses and manages memory according to valid bounds, lifetimes, and access rules, avoiding invalid accesses and related errors.

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 C or C++ components where memory bugs are a concern.
How deep it goes
Explains ownership and compile-time rejection of memory bugs, then identifies the limits of compiler checks for foreign memory.
Examples
Uses dangling pointers and data races as bug examples, alongside an incremental C or C++ refactoring process.
What you can do after
Apply it via Rust refactoring to reduce memory-bug risks while testing behavior across old and new code paths.

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.