Rio Project 4.2 API Documentation
org.rioproject.cybernode
Class MemoryCounter
java.lang.Object
org.rioproject.cybernode.MemoryCounter
public class MemoryCounter
- extends Object
Utility for getting memory footprint of objects.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryCounter
public MemoryCounter()
sizeOf
public static long sizeOf(Object obj)
- Returns object size.
- Parameters:
obj - The Object to get the size of
- Returns:
- The size of the object as determined by
Instrumentation
deepSizeOf
public static long deepSizeOf(Object obj)
- Get the deep size of an object
- Parameters:
obj - The object to get the size of
- Returns:
- Returns deep size of object, recursively iterating over its fields and
superclasses.
Copyright © 2006-2011 Rio Project. All Rights Reserved.