Generally, the heap is a segment used for dynamically allocating memory for program data. As opposed to a stack, objects stored on the heap often have lifetimes that extend beyond the lexical block or function in which they are initialized.

C runtime libraries have different implementation of the heap. One of the most common implementation on Linux is the glibc heap, which is based on the ptmalloc2 implementation of malloc (with “substantial changes”). See also emeryberger/Malloc-Implementations .

Assume glibc heap to be the heap implementation unless stated otherwise.