Microsoft SDK for Java

IJavaHeapMonitor::
GetHeapInfo

The GetHeapInfo method of the IJavaHeapMonitor interface is called by a memory profiler to register its callback interface for receiving notification when the heap is dumped at the end of each garbage collection. The single parameter passed in is a pointer to the IHeapInfoCallback interface implemented by the profiler. A memory profiler application can only have one callback installed at a time. To unregister the callback, this method can be called with a NULL pointer.

The Microsoft VM communicates with the profiler dumping the heap by calling various methods on the profiler's callback interface that is passed to GetHeapIno.

Syntax

HRESULT GetHeapInfo(IHeapInfoCallback *pihicb);

Parameters

[in] *pihicb A pointer to the IHeapInfoCallback interface implemented by the profiler.

Remarks

If a memory profiler has registered a callback, the Microsoft VM will dump the heap after each garbage collection to methods on the profiler's IHeapInfoCallback interface passed to this function. If a profiler does not want this heap dump to occur, it must unregister this callback by calling GetHeapInfo method with a NULL pointer.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.