public final class PageSizeUtil extends Object
Modifier and Type | Field and Description |
---|---|
static 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.
|
static int |
DEFAULT_PAGE_SIZE
The default page size on most systems.
|
static int |
PAGE_SIZE_UNKNOWN
Value indicating an unknown page size.
|
Modifier and Type | Method and Description |
---|---|
static int |
getSystemPageSize()
Tries to get the system page size.
|
static int |
getSystemPageSizeOrConservativeMultiple()
Tries to get the system page size.
|
static int |
getSystemPageSizeOrDefault()
Tries to get the system page size.
|
public static final int PAGE_SIZE_UNKNOWN
public static final int DEFAULT_PAGE_SIZE
public static final int CONSERVATIVE_PAGE_SIZE_MULTIPLE
public static int getSystemPageSize()
This internally relies on the presence of "unsafe" and the resolution via some Netty utilities.
public static int getSystemPageSizeOrDefault()
DEFAULT_PAGE_SIZE
.public static int getSystemPageSizeOrConservativeMultiple()
CONSERVATIVE_PAGE_SIZE_MULTIPLE
.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.