Heap Memory
← Back to Stack vs Heap
Dynamic memory region for allocations that need to outlive the creating function or have sizes unknown at compile time. Heap memory is managed either manually (malloc/free) or automatically (garbage collection) and can suffer from fragmentation.