Interface SizeClassesMetric

  • All Known Subinterfaces:
    PoolArenaMetric

    public interface SizeClassesMetric
    Expose metrics for an SizeClasses.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int normalizeSize​(int size)
      Normalizes usable size that would result from allocating an object with the specified size and alignment.
      long pageIdx2size​(int pageIdx)
      Computes size from lookup table according to pageIdx.
      long pageIdx2sizeCompute​(int pageIdx)
      Computes size according to pageIdx.
      int pages2pageIdx​(int pages)
      Normalizes request size up to the nearest pageSize class.
      int pages2pageIdxFloor​(int pages)
      Normalizes request size down to the nearest pageSize class.
      int size2SizeIdx​(int size)
      Normalizes request size up to the nearest size class.
      int sizeIdx2size​(int sizeIdx)
      Computes size from lookup table according to sizeIdx.
      int sizeIdx2sizeCompute​(int sizeIdx)
      Computes size according to sizeIdx.
    • Method Detail

      • sizeIdx2size

        int sizeIdx2size​(int sizeIdx)
        Computes size from lookup table according to sizeIdx.
        Returns:
        size
      • sizeIdx2sizeCompute

        int sizeIdx2sizeCompute​(int sizeIdx)
        Computes size according to sizeIdx.
        Returns:
        size
      • pageIdx2size

        long pageIdx2size​(int pageIdx)
        Computes size from lookup table according to pageIdx.
        Returns:
        size which is multiples of pageSize.
      • pageIdx2sizeCompute

        long pageIdx2sizeCompute​(int pageIdx)
        Computes size according to pageIdx.
        Returns:
        size which is multiples of pageSize
      • size2SizeIdx

        int size2SizeIdx​(int size)
        Normalizes request size up to the nearest size class.
        Parameters:
        size - request size
        Returns:
        sizeIdx of the size class
      • pages2pageIdx

        int pages2pageIdx​(int pages)
        Normalizes request size up to the nearest pageSize class.
        Parameters:
        pages - multiples of pageSizes
        Returns:
        pageIdx of the pageSize class
      • pages2pageIdxFloor

        int pages2pageIdxFloor​(int pages)
        Normalizes request size down to the nearest pageSize class.
        Parameters:
        pages - multiples of pageSizes
        Returns:
        pageIdx of the pageSize class
      • normalizeSize

        int normalizeSize​(int size)
        Normalizes usable size that would result from allocating an object with the specified size and alignment.
        Parameters:
        size - request size
        Returns:
        normalized size