JDK-8265066 : Split ReservedSpace constructor to avoid default parameter
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-04-12
  • Updated: 2021-04-22
  • Resolved: 2021-04-19
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 17
17 b19Fixed
Related Reports
Relates :  
Relates :  
Description
We have this constructor in ReservedSpace:
  // Initialize the reserved space with the given size. If preferred_page_size
  // is set, use this as minimum page size/alignment. This may waste some space
  // if the given size is not aligned to that value, as the reservation will be
  // aligned up to the final alignment in this case.
ReservedSpace(size_t size, size_t preferred_page_size = 0);

Instead of having the default parameter using two constructors would make the implementation more straight forward. 

This cleanup is another step towards JDK-8261527.
Comments
Changeset: e390e550 Author: Stefan Johansson <sjohanss@openjdk.org> Date: 2021-04-19 07:08:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/e390e550
19-04-2021