heap

/heep/ · noun · Development · Origin: 1960

Definitions

  1. A region of memory used for dynamic allocation, where objects are created and destroyed in arbitrary order during program execution. Unlike the stack (which is fast but rigid), heap memory can grow and shrink as needed but requires explicit management (or garbage collection) and is slower to allocate. Memory leaks occur when heap-allocated objects are never freed.

    In plain English: A flexible area of computer memory where programs store data that needs to stick around for a while — powerful but requires careful management to avoid memory leaks.

    Example: The service was leaking 50MB of heap memory per hour because a cache grew unboundedly and the garbage collector couldn't reclaim entries that were still referenced.

Related Terms