Rio Project 4.2 API Documentation



org.rioproject.cybernode
Class MemoryCounter

java.lang.Object
  extended by org.rioproject.cybernode.MemoryCounter

public class MemoryCounter
extends Object

Utility for getting memory footprint of objects.


Constructor Summary
MemoryCounter()
           
 
Method Summary
static long deepSizeOf(Object obj)
          Get the deep size of an object
static long sizeOf(Object obj)
          Returns object size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryCounter

public MemoryCounter()
Method Detail

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 © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.