liveBook · Manning

Allocated storage duration

Allocated storage duration is the C storage duration of dynamically allocated storage, ending when it is deallocated, reallocated, or the program terminates.

How 2 Manning books explain it

Modern C

Allocated storage is a region of C storage obtained dynamically for use in representing objects during execution.

How it is used
Explains how execution-time storage supports data whose size or shape cannot be fixed conveniently in advance.
How deep it goes
Defines allocated duration, allocation functions, lifetime, and initialization, but defers broader declaration and linkage details to comparison material.
Examples
Uses a dynamically allocated rational number, a vector of doubles, and allocation helpers for initialized rational arrays.
What you can do after
Apply it via malloc-family functions, explicit initialization, and free while reasoning about object lifetime.

Read how Modern C explains allocated storage duration →

Modern C, Third Edition

Allocated storage duration is the duration of an object created by a dynamic allocation function and ended by deallocation, reallocation, or program termination.

How it is used
Explains how dynamically created objects begin, persist, and end during C program execution.
How deep it goes
Defines lifetime boundaries and initialization obligations, without developing allocator internals.
Examples
Uses malloc with rat_init and recommends calloc or type-specific initialization functions for allocated data.
What you can do after
Operate dynamically allocated objects by selecting an allocation function, initializing storage, and ending its duration correctly.

Read how Modern C, Third Edition explains allocated storage duration →

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.