metaphor embodied-experience forcescalepath causeaccumulate hierarchy primitive

Memory Heap

metaphor dead

Source: Embodied ExperienceMemory Management

Categories: computer-science

Transfers

A disordered pile of objects where you grab what you need from wherever it happens to be. The heap in memory management borrows from the everyday image of a heap of things — a woodpile, a junk heap, a heap of laundry. Unlike a stack, which enforces strict last-in-first-out order, a heap has no ordering discipline. You allocate a chunk from wherever there is room, and you free it whenever you are done, regardless of what was allocated before or after.

Key structural parallels:

Limits

Expressions

Origin Story

The use of “heap” for unstructured dynamic memory dates to the 1960s. The term appears in early operating system literature as a contrast to the orderly stack: if the stack is the disciplined, automatic memory region, the heap is everything else — the region where memory is allocated and freed in no particular order. The choice of “heap” (a disordered pile) over alternatives like “pool” or “arena” was deliberate: it emphasizes the lack of structure.

In C, heap memory is managed through malloc() and free(), introduced in the earliest versions of the language. The K&R book (1978) describes dynamic allocation matter-of-factly, without explaining the metaphor — by then, “heap” was already a dead term in the same way “stack” was. The metaphor lives on in “heap corruption,” “heap fragmentation,” and the enduring contrast between stack and heap that every systems programmer learns as a fundamental distinction.

References

Related Entries

Structural Neighbors

Entries from different domains that share structural shape. Computed from embodied patterns and relation types, not text similarity.

Structural Tags

Patterns: forcescalepath

Relations: causeaccumulate

Structure: hierarchy Level: primitive

Contributors: agent:metaphorex-miner, fshot