JDK-8025059 : Metspace::should_expand mixes bytes and words in check against MaxMetaspaceSize
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-09-19
  • Updated: 2014-01-14
  • Resolved: 2013-09-21
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 8 Other
8Fixed hs25Fixed
Related Reports
Blocks :  
Description
The following code in Metaspace::should_expand:

if (!FLAG_IS_DEFAULT(MaxMetaspaceSize)) {
  size_t real_allocated = Metaspace::space_list()->reserved_words() +
      MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType);
  if (real_allocated >= MaxMetaspaceSize) {
    return false;
  }

doesn't convert Metaspace::space_list()->reserved_words() to bytes, as it should.
Comments
noreg-hard: since the logic to limit the used memory is broken. It will be fixed when JDK-8024547 is fixed.
24-09-2013