Ergonomics do not correctly calculate the maximum heap size to get zero based oops

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None

      Ergonomics calculation to get the maximum heap size to get zero based compressed oops is wrong.

      The current calculation is as follows:

      OopEncodingMax - HeapBaseMinAddress - align_up(vm_page_size, maximum conservative heap size)

      However in case of zero based oops, the space reserved due to HeapBaseMinAddress already contains the zero page, so actually the calculation should be

      OopEncodingMax - MAX2(HeapBaseMinAddress, align_up(vm_page_size, maximum conservative heap size))

      Further, when actually trying to reserve this maximum heap size for zero based oops, during quick checking it seems that most OSes fail to do so, always returning heap based compressed oops.
      Check whether this is an OS issue (i.e. the OS never allows zero heap based oops) or not.

            Assignee:
            Coleen Phillimore
            Reporter:
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: