liveBook · Manning

Explicit memory management

Also called manual memory management

Explicit memory management is the practice of controlling the allocation and release of dynamically used memory through program code.

How 2 Manning books explain it

Refactoring to Rust

Manual memory management is a memory-management approach in which program developers explicitly control when memory is allocated and released.

How it is used
Contrasts developer-controlled cleanup with garbage collection when discussing memory-management approaches.
How deep it goes
Defines allocation and deallocation, explains stack and heap differences, and stops short of detailed implementation mechanics.
Examples
Uses a welcome program with explicit free operations to show where cleanup occurs.
What you can do after
Evaluate allocation choices by weighing memory use, allocation cost, and risks from insufficient memory.

Read how Refactoring to Rust explains explicit memory management →

Systems Programming with Zig

Manual memory management is the explicit allocation, ownership, and release of dynamically used memory by program code.

How it is used
Uses allocator selection to manage data lifetimes in a Zig FFI data representation.
How deep it goes
Explains shared arena lifetimes and shows initialization and arena cleanup in a data structure.
Examples
Uses a recipe book containing strings, a hash map, and an array list to illustrate allocator choices.
What you can do after
Evaluate/understand how allocator choices group data by lifetime while retaining programmer control.

Read how Systems Programming with Zig explains explicit memory management →

Also covered in

What to know first

Related concepts

Questions about explicit memory management

What is explicit memory management?

Explicit memory management is the practice of controlling the allocation and release of dynamically used memory through program code.

Which Manning books explain explicit memory management?

Refactoring to Rust and Systems Programming with Zig.

What should I know before learning explicit memory management?

Manning books that teach explicit memory management usually introduce C++ first.

What is the difference between explicit memory management and garbage collection?

Explicit memory management is the practice of controlling the allocation and release of dynamically used memory through program code. Garbage collection is an automated process that identifies and reclaims or removes memory, data, or other items no longer reachable or needed by a system.

What is explicit memory management also called?

Explicit memory management is also called manual memory management.

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.