Class MemoryUtil

java.lang.Object
org.codelibs.fess.util.MemoryUtil

public final class MemoryUtil extends Object
Utility class for memory operations and size calculations.
  • Method Details

    • getMemoryUsageLog

      public static String getMemoryUsageLog()
      Gets a formatted memory usage log string.
      Returns:
      formatted memory usage information
    • byteCountToDisplaySize

      public static String byteCountToDisplaySize(long size)
      Converts byte count to human-readable size format.
      Parameters:
      size - the size in bytes
      Returns:
      formatted size string
    • getUsedMemory

      public static long getUsedMemory()
      Gets the currently used memory in bytes.
      Returns:
      used memory in bytes
    • sizeOf

      public static long sizeOf(Object obj)
      Estimates the size of an object in bytes.
      Parameters:
      obj - the object to calculate size for
      Returns:
      estimated size in bytes