Class SizeUtils

java.lang.Object
org.ametys.core.util.SizeUtils

public final class SizeUtils extends Object
Helper for manipulating objects heap size.
  • Method Details

    • enabled

      public static boolean enabled()
      Returns true if size computation is enabled for this VM
      Returns:
      true if size computation is enabled
    • sizeOf

      public static long sizeOf(Object object)
      Calculates the heap size of the given object.
      Parameters:
      object - the object
      Returns:
      the size of the object.