- 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
Modifier and TypeMethodDescriptionGets iterator of child categories.long
Gets number of allocations recorded against this category, and all children of this category.long
Gets number of bytes recorded against this category, and all children of this category.getMemorySections
(boolean includeFreed) Gets iterator of memory sections allocated against this category.getName()
Gets the name of this category.long
Gets number of allocations recorded against this category.long
Gets number of bytes allocated under this category.
-
Method Details
-
getName
Gets the name of this category. E.g. "Classes".- Returns:
- Name string.
- Throws:
CorruptDataException
-
getShallowAllocations
Gets number of allocations recorded against this category.- Returns:
- Allocation count.
- Throws:
CorruptDataException
-
getShallowBytes
Gets number of bytes allocated under this category.- Returns:
- Number of bytes.
- Throws:
CorruptDataException
-
getDeepAllocations
Gets number of allocations recorded against this category, and all children of this category.- Returns:
- Allocation count.
- Throws:
CorruptDataException
-
getDeepBytes
Gets number of bytes recorded against this category, and all children of this category.- Returns:
- Number of bytes.
- Throws:
CorruptDataException
-
getChildren
Gets iterator of child categories.- Returns:
- Iterator of JavaRuntimeMemoryCategory objects that are immediate children of this category.
- Throws:
CorruptDataException
-
getMemorySections
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:
-