They could be the same except metaspace uses them for compressed class space.
From Goetz:
1) Merging ReservedHeap::initialize and ReservedHeapSpace::try_reserve_heap.
The new code calls initialize() with requested_address = NULL, but metaspace.cpp
passes a real requested_address. Therefore I can not clean up the calls to
failed_to_reserve_as_requested() in initialize(). Without that cleanup, I need to pass flags
into initialize() to configure all the different behaviours I would need in a
merged case.
I think with 'large' and 'requested_address' there is already enough cases
in that method, so that I don't want to add more.
2) Moving _noaccess_prefix to ReservedHeapSpace
This does not work as ReservedHeapSpace is casted to
ReservedSpace and returned by value. So ReservedHeapSpace can not have
fields or virtual methods.
It would be probably better to change the code to return ReservedHeapSpace
by pointer, or, at least under that type, but I think that exceeds the scope of this change.
(Is duplicate code a bug or RFE?)
- relates to
-
JDK-8064457 Introduce compressed oops mode "disjoint base" and improve compressed heap handling.
-
- Resolved
-