Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345655

Move reservation code out of ReservedSpace

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • b03

      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

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: