-
- All Known Implementing Classes:
DTFJJavaRuntimeMemoryCategory
,JCJavaRuntimeMemoryCategory
public interface JavaRuntimeMemoryCategory
Represents a category of native memory allocated by the Java runtime.
A category is a high-level grouping of memory allocations such as "Threads", "Classes" or "Java Heap".
Some Java runtime implementations use categories to track native memory use in the JRE.
Categories can have child categories and form a hierarchy.
The getShallow* methods return the allocation data for just this category. The getDeep* methods return the allocation data for this category and all its child categories.
- Since:
- 1.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterator
getChildren()
Gets iterator of child categories.long
getDeepAllocations()
Gets number of allocations recorded against this category, and all children of this category.long
getDeepBytes()
Gets number of bytes recorded against this category, and all children of this category.Iterator
getMemorySections(boolean includeFreed)
Gets iterator of memory sections allocated against this category.String
getName()
Gets the name of this category.long
getShallowAllocations()
Gets number of allocations recorded against this category.long
getShallowBytes()
Gets number of bytes allocated under this category.
-
-
-
Method Detail
-
getName
String getName() throws CorruptDataException
Gets the name of this category. E.g. "Classes".- Returns:
- Name string.
- Throws:
CorruptDataException
-
getShallowAllocations
long getShallowAllocations() throws CorruptDataException
Gets number of allocations recorded against this category.- Returns:
- Allocation count.
- Throws:
CorruptDataException
-
getShallowBytes
long getShallowBytes() throws CorruptDataException
Gets number of bytes allocated under this category.- Returns:
- Number of bytes.
- Throws:
CorruptDataException
-
getDeepAllocations
long getDeepAllocations() throws CorruptDataException
Gets number of allocations recorded against this category, and all children of this category.- Returns:
- Allocation count.
- Throws:
CorruptDataException
-
getDeepBytes
long getDeepBytes() throws CorruptDataException
Gets number of bytes recorded against this category, and all children of this category.- Returns:
- Number of bytes.
- Throws:
CorruptDataException
-
getChildren
Iterator getChildren() throws CorruptDataException
Gets iterator of child categories.- Returns:
- Iterator of JavaRuntimeMemoryCategory objects that are immediate children of this category.
- Throws:
CorruptDataException
-
getMemorySections
Iterator getMemorySections(boolean includeFreed) throws CorruptDataException, DataUnavailable
Gets iterator of memory sections allocated against this category.- Parameters:
includeFreed
- If true, iterator will iterate over blocks of memory that have been freed, but haven't been re-used yet.- Returns:
- Iterator of memory sections
- Throws:
CorruptDataException
DataUnavailable
- See Also:
CorruptData
-
-