Package oshi.hardware
Interface GlobalMemory
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractGlobalMemory
,FreeBsdGlobalMemory
,LinuxGlobalMemory
,MacGlobalMemory
,SolarisGlobalMemory
,WindowsGlobalMemory
public interface GlobalMemory extends java.io.Serializable
Memory refers to the state information of a computing system, as it is kept active in some physical structure. The term "memory" is used for the information in physical systems which are fast (ie. RAM), as a distinction from physical systems which are slow to access (ie. data storage). By design, the term "memory" refers to temporary state devices, whereas the term "storage" is reserved for permanent data.- Author:
- dblock[at]dblock[dot]org
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAvailable()
The amount of physical memory currently available, in bytes.long
getPageSize()
The number of bytes in a memory pagelong
getSwapPagesIn()
Number of pages read from paging/swap file(s) to resolve hard page faults.long
getSwapPagesOut()
Number of pages written to paging/swap file(s) to free up space in physical memory.long
getSwapTotal()
The current size of the paging/swap file(s), in bytes.long
getSwapUsed()
The current memory committed to the paging/swap file(s), in byteslong
getTotal()
The amount of actual physical memory, in bytes.
-
-
-
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.
-
getSwapTotal
long getSwapTotal()
The current size of the paging/swap file(s), in bytes. If the paging/swap file can be extended, this is a soft limit.- Returns:
- Total swap in bytes.
-
getSwapUsed
long getSwapUsed()
The current memory committed to the paging/swap file(s), in bytes- Returns:
- Swap used in bytes
-
getSwapPagesIn
long getSwapPagesIn()
Number of pages read from paging/swap file(s) to resolve hard page faults. (Hard page faults occur when a process requires code or data that is not in its working set or elsewhere in physical memory, and must be retrieved from disk.) This property was designed as a primary indicator of the kinds of faults that cause system-wide delays. It includes pages retrieved to satisfy faults in the file system cache (usually requested by applications) and in non-cached mapped memory files.- Returns:
- Pages swapped in
-
getSwapPagesOut
long getSwapPagesOut()
Number of pages written to paging/swap file(s) to free up space in physical memory. Pages are written back to disk only if they are changed in physical memory, so they are likely to hold data, not code. A high rate of pages output might indicate a memory shortage. The operating system writes more pages back to disk to free up space when physical memory is in short supply.- Returns:
- Pages swapped out
-
getPageSize
long getPageSize()
The number of bytes in a memory page- Returns:
- Page size in bytes.
-
-