Class PageSizeUtil

java.lang.Object
org.apache.flink.runtime.io.network.partition.PageSizeUtil

public final class PageSizeUtil extends Object
Utility for accessing the system page size.
  • Field Details

    • PAGE_SIZE_UNKNOWN

      public static final int PAGE_SIZE_UNKNOWN
      Value indicating an unknown page size.
      See Also:
    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      The default page size on most systems.
      See Also:
    • CONSERVATIVE_PAGE_SIZE_MULTIPLE

      public static final int CONSERVATIVE_PAGE_SIZE_MULTIPLE
      A conservative fallback value (64 KiBytes) that should be a multiple of the page size even in some uncommon cases of servers installations with larger-than-usual page sizes.
      See Also:
  • Method Details

    • getSystemPageSize

      public static int getSystemPageSize()
      Tries to get the system page size. If the page size cannot be determined, this returns -1.

      This internally relies on the presence of "unsafe" and the resolution via some Netty utilities.

    • getSystemPageSizeOrDefault

      public static int getSystemPageSizeOrDefault()
      Tries to get the system page size. If the page size cannot be determined, this returns the DEFAULT_PAGE_SIZE.
    • getSystemPageSizeOrConservativeMultiple

      public static int getSystemPageSizeOrConservativeMultiple()
      Tries to get the system page size. If the page size cannot be determined, this returns the CONSERVATIVE_PAGE_SIZE_MULTIPLE.