Class OpenBsdGlobalMemory

java.lang.Object
oshi.hardware.common.AbstractGlobalMemory
oshi.hardware.common.platform.unix.openbsd.OpenBsdGlobalMemory
All Implemented Interfaces:
GlobalMemory

public abstract class OpenBsdGlobalMemory extends AbstractGlobalMemory
  • Constructor Details

    • OpenBsdGlobalMemory

      public OpenBsdGlobalMemory()
  • 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
    • queryPhysMem

      protected abstract long queryPhysMem()
      Queries total physical memory in bytes.
      Returns:
      total physical memory in bytes
    • queryPageSize

      protected abstract long queryPageSize()
      Queries the system page size in bytes.
      Returns:
      the page size in bytes
    • createVirtualMemory

      protected abstract VirtualMemory createVirtualMemory()
      Constructs the matching OpenBsdVirtualMemory concrete (JNA or FFM) for this instance.
      Returns:
      the VirtualMemory paired with this GlobalMemory implementation