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

CDS archived heap should always be relocated to the top of the heap

    Details

      Description

      When the runtime heap and dump time heap have different sizes, it's possible that the archived heap regions are mapped to the middle of the runtime heap. Because the archived heap regions are pinned, this could reduce the size of the largest "humongous" array allocation.

      In the worst case, the maximum allocatable array length may be half of the optimal value.

      The condition that needs to be changed is here:

      http://hg.openjdk.java.net/valhalla/valhalla/file/a3f98752448c/src/hotspot/share/memory/filemap.cpp#l947

       if (!heap_reserved.contains(range)) { <<<<<<<< HERE: change to "not at the top end"
            log_info(cds)("CDS heap data need to be relocated because");
            log_info(cds)("the desired range " PTR_FORMAT " - " PTR_FORMAT, p2i(range.start()), p2i(range.end()));
            log_info(cds)("is outside of the heap " PTR_FORMAT " - " PTR_FORMAT, p2i(heap_reserved.start()), p2i(heap_reserved.end()));
            _heap_pointers_need_patching = true;
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iklam Ioi Lam
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: