NAME
hheeaapp - List all the malloc-allocated buffers in the process's heap
SYNOPSIS
hheeaapp [-gguueessssNNoonnOObbjjeeccttss] pid | partial-executable-name
DESCRIPTION
hheeaapp lists the objects currently allocated on the heap of the specified
process, as well as summary data. Objects are categorized by class name,type (Objective-C, C++, or CFType), and binary image. C++ objects are
identified by the vtable referenced from the start of the object, so with multiple inheritance this may not give the precise class of the object. The binary image identified for a class is the image which implements the class, not necessarily the binary image which caused the objects to be allocated at runtime, or which "owns" those objects.hheeaapp requires one parameter - either a process ID or a full or partial
executable name.The -guessNonObjects option causes hheeaapp to look through the memory con-
tents of each Objective-C object to find pointers to malloc'ed blocks
(non-objects), such as the variable array hanging from an NSArray. These
referenced blocks of memory are identified as their offset from the start of the object (say "NSCFArray[12]"). The count, number of bytes, andaverage size of memory blocks referenced from each different object off-
set location are listed in the output.SEE ALSO
malloc(3), leaks(1), mallochistory(1), vmmap(1) The developer tools for the system also include a graphical application, /Developer/Applications/Instruments.app, that provides instruments that give information similar to that provided by hheeaapp.. The ObjectAllocinstrument graphically displays dynamic, real-time information about the
object and memory use in an application, including backtraces of where the allocations occured. The Leaks instrument in performs memory leak analysis. To use these instruments, the target application must belaunched from Instruments.app, whereas hheeaapp can examine existing pro-
cesses. hheeaapp also has the advantage that the data can be immediatelyparsed by text-based tools, and impacts the system less because it is not
a full graphical application. BSD March 15, 2007 BSD