JDK-6191542 : getTotalSwapSpaceSize() returns wrong swap file size on linux-amd64.
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2004-11-05
  • Updated: 2012-02-02
  • Resolved: 2004-12-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u4Fixed 6 b17Fixed
Related Reports
Relates :  
Description
Following test case fails because java reads incorrect swap file
size.

com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java

On linux amd64 machine getTotalSwapSpaceSize() returns wrong 
swap file size.
###@###.### 2004-11-05 18:03:29 GMT

Comments
EVALUATION Swap file size is read from /proc/meminfo. The offset to swap file size has changed in the latest version of linux. The offsets in /proc/meminfo are not backward compatible so we should use sysinfo() system call instead. ###@###.### 2004-11-05 18:07:44 GMT
05-11-2004