JDK-6840305 : Discrepancy in system memory details (when 4G or greater) reported by JVM and Windows OS
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 5.0u16
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2008
  • CPU: generic
  • Submitted: 2009-05-12
  • Updated: 2011-02-16
  • Resolved: 2009-07-14
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.
JDK 6 JDK 7 Other
6u16-revFixed 7Fixed hs14.2Fixed
Customer seeing a discrepancy in system memory details shown in hs_err log and the actual memory in the win2k8 server.

Actual RAM size  :4GB  but in hs_err it is  physical 2097151k(157596k free)
Actual Virtual Memory      :8GB but in hs_err it is swap 4194303k(3189640k free)

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/8c79517a9300

EVALUATION GlobalMemoryStatus() does not report correct memory usage when the system has more than 4gb of RAM. GlobalMemoryStatusEx() should be used in place of GlobalMemoryStatus().