Package oshi.hardware

Interface GlobalMemory

    • Method Detail

      • getTotal

        long getTotal()
        The amount of actual physical memory, in bytes.
        Returns:
        Total number of bytes.
      • getAvailable

        long getAvailable()
        The amount of physical memory currently available, in bytes.
        Returns:
        Available number of bytes.
      • getPageSize

        long getPageSize()
        The number of bytes in a memory page
        Returns:
        Page size in bytes.
      • getVirtualMemory

        VirtualMemory getVirtualMemory()
        Virtual memory, such as a swap file.
        Returns:
        A VirtualMemory object.
      • getPhysicalMemory

        java.util.List<PhysicalMemory> getPhysicalMemory()
        Physical memory, such as banks of memory.

        On Linux, requires elevated permissions. On FreeBSD and Solaris, requires installation of dmidecode.

        Returns:
        A list of PhysicalMemory objects.