public class PhysicalMemory extends Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
PhysicalMemory.PhysicalMemorySupport
Implemented by operating-system specific code.
|
Constructor and Description |
---|
PhysicalMemory() |
Modifier and Type | Method and Description |
---|---|
static org.graalvm.word.UnsignedWord |
getCachedSize()
Returns the size of physical memory in bytes that has been previously cached.
|
static boolean |
isInitialized()
Returns true if the memory size has been queried from the OS, i.e., if
PhysicalMemory.getCachedSize() can be called. |
static org.graalvm.word.UnsignedWord |
size()
Returns the size of physical memory in bytes, querying it from the OS if it has not been
initialized yet.
|
static void |
tryInitialize()
Tries to initialize the cached memory size.
|
public static org.graalvm.word.UnsignedWord size()
public static void tryInitialize()
public static boolean isInitialized()
PhysicalMemory.getCachedSize()
can be called.public static org.graalvm.word.UnsignedWord getCachedSize()
PhysicalMemory.isInitialized()
is still false.