Class SolarisGlobalMemory

java.lang.Object
oshi.hardware.common.AbstractGlobalMemory
oshi.hardware.common.platform.unix.solaris.SolarisGlobalMemory
All Implemented Interfaces:
GlobalMemory

public abstract class SolarisGlobalMemory extends AbstractGlobalMemory
Memory obtained by kstat.
  • Constructor Details

    • SolarisGlobalMemory

      public SolarisGlobalMemory()
  • Method Details

    • getAvailable

      public long getAvailable()
      Description copied from interface: GlobalMemory
      The amount of physical memory currently available, in bytes.
      Returns:
      Available number of bytes.
    • getTotal

      public long getTotal()
      Description copied from interface: GlobalMemory
      The amount of actual physical memory, in bytes.
      Returns:
      Total number of bytes.
    • getPageSize

      public long getPageSize()
      Description copied from interface: GlobalMemory
      The number of bytes in a memory page
      Returns:
      Page size in bytes.
    • getVirtualMemory

      public VirtualMemory getVirtualMemory()
      Description copied from interface: GlobalMemory
      Virtual memory, such as a swap file.

      Operating systems differ significantly in how they manage virtual memory. See the VirtualMemory class 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 the pagesize command.
      Returns:
      the page size in bytes
    • createVirtualMemory

      protected VirtualMemory createVirtualMemory()
      Constructs the SolarisVirtualMemory paired with this GlobalMemory instance.
      Returns:
      the VirtualMemory paired with this GlobalMemory implementation