com.jniwrapper.win32.system
Class MemoryInfo

java.lang.Object
  extended by com.jniwrapper.win32.system.MemoryInfo

public class MemoryInfo
extends java.lang.Object

Class allows to obtain information about the current state of both physical and virtual memory, including extended memory.
Function uses GlobalMemoryStatusEx API funciton and MemoryStatusEx structure for getting information starting from Windows2000 and higher versions.
The GlobalMemoryStatus API funciton and MemoryStatus structure are being used on earlier versions of operating systems.


Constructor Summary
MemoryInfo()
          Creates new instance of MemoryInfo class.
 
Method Summary
 long getAvailExtendedVirtual()
          Size of unreserved and uncommitted memory in the extended portion of the virtual address space of the calling process, in bytes
 long getAvailPageFile()
          Size of available memory to commit, in bytes.
 long getAvailPhys()
          Size of physical memory available, in bytes.
 long getAvailVirtual()
          Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process, in bytes.
 long getMemoryLoad()
          Number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).
 long getTotalPageFile()
          Size of the committed memory limit, in bytes.
 long getTotalPhys()
          Total size of physical memory, in bytes.
 long getTotalVirtual()
          Total size of the user mode portion of the virtual address space of the calling process, in bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryInfo

public MemoryInfo()
Creates new instance of MemoryInfo class.

Method Detail

getMemoryLoad

public long getMemoryLoad()
Number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).

Returns:
approximate percentage of physical memory that is in use

getTotalPhys

public long getTotalPhys()
Total size of physical memory, in bytes.

Returns:
total size of physical memory

getAvailPhys

public long getAvailPhys()
Size of physical memory available, in bytes.

Returns:
size of physical memory available

getTotalPageFile

public long getTotalPageFile()
Size of the committed memory limit, in bytes.

Returns:
size of the committed memory limit

getAvailPageFile

public long getAvailPageFile()
Size of available memory to commit, in bytes.

Returns:
size of available memory to commit

getTotalVirtual

public long getTotalVirtual()
Total size of the user mode portion of the virtual address space of the calling process, in bytes

Returns:
total size of the user mode portion of the virtual address space

getAvailVirtual

public long getAvailVirtual()
Size of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process, in bytes.

Returns:
size of unreserved and uncommitted memory in the user mode portion of the virtual address space

getAvailExtendedVirtual

public long getAvailExtendedVirtual()
Size of unreserved and uncommitted memory in the extended portion of the virtual address space of the calling process, in bytes

Returns:
size of unreserved and uncommitted memory in the extended mode portion of the virtual address space