HeapProfiling
Heap profiling is the analysis of a program’s dynamic memory allocations on the heap to understand how memory is used over time. It aims to reveal patterns of allocation and deallocation, identify memory leaks, fragmentation, and areas where excessive or unnecessary allocations occur. Heap profiling complements other memory analysis approaches by focusing on the lifetimes and retention of objects rather than just total usage.
Profiling methods fall into several categories. Instrumentation-based approaches insert hooks to record every allocation or deallocation,
Common outputs from heap profilers include total memory allocated over time, live object counts, allocation sites
Tools and environments vary by language. C/C++ users may rely on Valgrind massif, heaptrack, or Google’s heap