Memory Profiling Go Languaje
If you are trying to debug a memory leak in your Go application, and need a way to determine which type is taking the most memory I.E a sorted list of (object type, total instances, total memory).
Runtime.MemStats doesn’t give details about the type, and goprof doesn’t seem to do memory profiling.
At this moment, the currente memory allocator only keeps track of whether or not the type can
contain a pointer

February 28, 2010 - 10:17 AM
Una alternativa que puedes usar para debuggear es valgrind.
The Valgrind distribution currently includes six production-quality tools: a memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache profiler, and a heap profiler. It also includes two experimental tools: a heap/stack/global array overrun detector, and a SimPoint basic block vector generator. It runs on the following platforms: X86/Linux, AMD64/Linux, PPC32/Linux, PPC64/Linux, and X86/Darwin (Mac OS X).