The ModifyHeapMonitorCapabilities method of the IJavaHeapMonitor interface is called by a memory profiler to query or modify the heap monitoring capabilities provided by the Microsoft VM. The application can request that specific heap monitoring functions be enabled or disabled. This method takes two input parameters: a bitmask of heap monitoring capability flags (from the JVM_HEAPMON_CAPABILITIES enumeration) and a Boolean variable that indicates whether these capabilities should be enabled or disabled. Currently, the only capability supported is whether the object's age (the number of garbage collections that the object has survived) is maintained by the Microsoft VM.
HRESULT ModifyHeapMonitorCapabilities(DWORD capabilities, BOOL fenable, DWORD *penabled_capabilities);
A bitmask of flags representing the enabled heap monitoring capabilities from the JVM_HEAPMON_CAPABILITIES enumeration.
[in] capabilities | A bitmask of flags of heap monitoring capabilities (JVM_HEAPMON_CAPABILITIES) that are requested. |
[in] fenable | A boolean variable that indicates whether these capabilities should be enabled (when set to TRUE) or disabled (when set to FALSE). |
[out] *penabled_capabilities | A bitmask representing the enabled heap monitoring capabilities (JVM_HEAPMON_CAPABILITIES). |
Constant | Value | Description |
JVM_HEAPMON_OBJECT_AGE | 1 | Keeps track of the age of an object (how many garbage collections the object has survived). This can be modified only during the profiler's Initialize callback. |