The ReservedSpace class and its friends has a dual functionality of describing a reserved memory region AND it also reserves memory. I would like to split this so that the ReservedSpace classes only acts as data carrier about reserved memory and then have a more explicit API for reserving memory and baking a ReservedSpace given the outcome of the reservation.
The dual functionality of ReservedSpace makes the code hard to read and it is hard to see / realize that the constructors reserve memory. However, this is not the only reason to try to take a step back and clean up ReservedSpace. So while doing a restructure here I think we should clean up things like::
1) Move the noaccess_prefix and related code out from ReservedSpace into ReservedHeapSpace.
2) Move _fd_for_heap out out of ReservedSpace.
3) Clearer requirements and asserts w.r.t. the input arguments size, alignment, and page_size.
Current prototype:
https://github.com/stefank/jdk/tree/refs/heads/reserved_space_rewrite
The dual functionality of ReservedSpace makes the code hard to read and it is hard to see / realize that the constructors reserve memory. However, this is not the only reason to try to take a step back and clean up ReservedSpace. So while doing a restructure here I think we should clean up things like::
1) Move the noaccess_prefix and related code out from ReservedSpace into ReservedHeapSpace.
2) Move _fd_for_heap out out of ReservedSpace.
3) Clearer requirements and asserts w.r.t. the input arguments size, alignment, and page_size.
Current prototype:
https://github.com/stefank/jdk/tree/refs/heads/reserved_space_rewrite
- relates to
-
JDK-8346605 AIX fastdebug build fails in memoryReserver.cpp after JDK-8345655
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/73b5dbae
-
Review(master) openjdk/jdk/22712