JDK-8038405 : Clean up some virtual fucntions in Space class hierarchy
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-26
  • Updated: 2015-01-21
  • Resolved: 2014-03-28
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 JDK 9
8u40Fixed 9 b08Fixed
Description
Space::is_in is implemented the same by all Space subclasses, move it to Space and make it non-virtual.
Space::used_region has a bogus implementation that is never useful, remove it.
Consolidate more code related to saved_marks in the Space base class
Make CompactibleSpace::reset_after_compaction a pure virtual.
Give Space::minimum_free_block_size a default implementation since only CMS needs to override it.

This is useful in order to reduce the amount of code needed to disconnect G1 from ContiguousSpace.