liveBook · Manning

Static storage

Static storage duration is the storage duration of an object whose lifetime extends throughout program execution.

How 3 Manning books explain it

Modern C, Third Edition

A static object is a C object with static storage duration whose lifetime extends across the entire program execution.

How it is used
Explains how object lifetime and initialization depend on storage duration.
How deep it goes
Defines lifetime, eligible object forms, and initialization constraints, including startup-resolved addresses.
Examples
Shows a file-scope object, a static compound literal, and a block-scope static object.
What you can do after
Understand which C objects persist throughout execution and how they are initialized.

Read how Modern C, Third Edition explains static storage →

Modern C

static is a C storage class specifier that gives an object static storage duration and can affect linkage.

How it is used
Separates an object's lifetime and initialization rules from the visibility of its identifier.
How deep it goes
Defines static duration, its declaration routes, whole-execution lifetime, and initialization constraints, while only briefly noting linker mechanics.
Examples
Uses file-scope objects, block-scope static variables, and a compound literal to illustrate static duration.
What you can do after
Understand which objects persist throughout execution and how static duration affects their initialization.

Read how Modern C explains static storage →

Embedded Software with Rust

Memory whose allocation persists for the entire execution of a program.

How it is used
Uses static storage for persistent data and deterministic memory use in resource-constrained firmware.
How deep it goes
Explains placement, startup initialization, lifetime, and memory-region trade-offs without showing a static declaration.
Examples
Identifies lookup tables, configuration constants, and global state as uses for static memory.
What you can do after
Evaluate static storage against stack and heap allocation for persistent data in embedded firmware.

Read how Embedded Software with Rust explains static storage →

What to know first

Related concepts

Questions about static storage

What is static storage?

Static storage duration is the storage duration of an object whose lifetime extends throughout program execution.

Which Manning books explain static storage?

Modern C, Third Edition, Modern C and Embedded Software with Rust.

What should I know before learning static storage?

Manning books that teach static storage usually introduce memory location, compound literal, file scope and initialization first.

What is static storage a kind of?

Static storage is a kind of storage class. A storage class specifier is a C declaration keyword that specifies an object's storage duration, linkage, or related declaration properties.

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.