Loading page…
A region of memory used for dynamic allocation, managed by functions like malloc and free.
Unlike the stack, the heap does not have automatic cleanup. Memory leaks occur when allocated heap memory is never freed. Heap allocators use complex data structures like free lists and bins.