MCPcopy
hub / github.com/oshi/oshi / VirtualMemory

Interface VirtualMemory

oshi-core/src/main/java/oshi/hardware/VirtualMemory.java:33–102  ·  view source on GitHub ↗

The VirtuallMemory class tracks information about the use of a computer's virtual memory (swap file) which temporarily moves rarely accessed information to a disk or other storage device.

Source from the content-addressed store, hash-verified

31 * information to a disk or other storage device.
32 */
33@ThreadSafe
34public interface VirtualMemory {
35
36 /**
37 * The current size of the paging/swap file(s), in bytes. If the paging/swap
38 * file can be extended, this is a soft limit.
39 *
40 * @return Total swap in bytes.
41 */
42 long getSwapTotal();
43
44 /**
45 * The current memory committed to the paging/swap file(s), in bytes
46 *
47 * @return Swap used in bytes
48 */
49 long getSwapUsed();
50
51 /**
52 * The maximum memory that can be committed by the system without extending the
53 * paging file(s), in bytes. Also called the Commit Limit. If the paging/swap
54 * file can be extended, this is a soft limit. This is generally equal to the
55 * sum of the sizes of physical memory and paging/swap file(s).
56 * <p>
57 * On Linux, represents the total amount of memory currently available to be
58 * allocated on the system based on the overcommit ratio, identified as
59 * {@code CommitLimit}. This may be higher or lower than the total size of
60 * physical and swap memory depending on system configuration.
61 *
62 * @return Max Virtual Memory in bytes
63 */
64 long getVirtualMax();
65
66 /**
67 * The memory currently committed by the system, in bytes. Also called the
68 * Commit Total. This is generally equal to the sum of the bytes used of
69 * physical memory and paging/swap file(s).
70 * <p>
71 * On Windows, committing pages changes this value immediately; however, the
72 * physical memory is not charged until the pages are accessed, so this value
73 * may exceed the sum of used physical and paging/swap file memory.
74 *
75 * @return Swap used in bytes
76 */
77 long getVirtualInUse();
78
79 /**
80 * Number of pages read from paging/swap file(s) to resolve hard page faults.
81 * (Hard page faults occur when a process requires code or data that is not in
82 * its working set or elsewhere in physical memory, and must be retrieved from
83 * disk.) This property was designed as a primary indicator of the kinds of
84 * faults that cause system-wide delays. It includes pages retrieved to satisfy
85 * faults in the file system cache (usually requested by applications) and in
86 * non-cached mapped memory files.
87 *
88 * @return Pages swapped in
89 */
90 long getSwapPagesIn();

Callers 12

updateDatasetsMethod · 0.95
testGlobalMemoryMethod · 0.95
toStringMethod · 0.65
updateDatasetsMethod · 0.95
testGlobalMemoryMethod · 0.95
toStringMethod · 0.65
testGlobalMemoryMethod · 0.95
toStringMethod · 0.65
testGlobalMemoryMethod · 0.95
toStringMethod · 0.65
testGlobalMemoryMethod · 0.95
testGlobalMemoryMethod · 0.95

Implementers 8

FreeBsdVirtualMemoryoshi-core/src/main/java/oshi/hardware/
SolarisVirtualMemoryoshi-core/src/main/java/oshi/hardware/
OpenBsdVirtualMemoryoshi-core/src/main/java/oshi/hardware/
AixVirtualMemoryoshi-core/src/main/java/oshi/hardware/
WindowsVirtualMemoryoshi-core/src/main/java/oshi/hardware/
LinuxVirtualMemoryoshi-core/src/main/java/oshi/hardware/
MacVirtualMemoryoshi-core/src/main/java/oshi/hardware/
AbstractVirtualMemoryoshi-core/src/main/java/oshi/hardware/

Calls

no outgoing calls

Tested by

no test coverage detected