Class SolarisGlobalMemory
java.lang.Object
oshi.hardware.common.AbstractGlobalMemory
oshi.hardware.common.platform.unix.solaris.SolarisGlobalMemory
- All Implemented Interfaces:
GlobalMemory
Memory obtained by kstat.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected VirtualMemoryConstructs theSolarisVirtualMemorypaired with this GlobalMemory instance.longThe amount of physical memory currently available, in bytes.longThe number of bytes in a memory pagelonggetTotal()The amount of actual physical memory, in bytes.Virtual memory, such as a swap file.protected abstract longQueries available memory in bytes.protected longQueries the system page size in bytes via thepagesizecommand.protected abstract longQueries total physical memory in bytes.Methods inherited from class AbstractGlobalMemory
getPhysicalMemory, toString
-
Constructor Details
-
SolarisGlobalMemory
public SolarisGlobalMemory()
-
-
Method Details
-
getAvailable
public long getAvailable()Description copied from interface:GlobalMemoryThe amount of physical memory currently available, in bytes.- Returns:
- Available number of bytes.
-
getTotal
public long getTotal()Description copied from interface:GlobalMemoryThe amount of actual physical memory, in bytes.- Returns:
- Total number of bytes.
-
getPageSize
public long getPageSize()Description copied from interface:GlobalMemoryThe number of bytes in a memory page- Returns:
- Page size in bytes.
-
getVirtualMemory
Description copied from interface:GlobalMemoryVirtual memory, such as a swap file.Operating systems differ significantly in how they manage virtual memory. See the
VirtualMemoryclass documentation for details on Windows commit-charge, Linux overcommit, and macOS compressed-memory models.- Returns:
- A VirtualMemory object.
-
queryAvailable
protected abstract long queryAvailable()Queries available memory in bytes.- Returns:
- available memory in bytes
-
queryTotal
protected abstract long queryTotal()Queries total physical memory in bytes.- Returns:
- total physical memory in bytes
-
queryPageSize
protected long queryPageSize()Queries the system page size in bytes via thepagesizecommand.- Returns:
- the page size in bytes
-
createVirtualMemory
Constructs theSolarisVirtualMemorypaired with this GlobalMemory instance.- Returns:
- the VirtualMemory paired with this GlobalMemory implementation
-