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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 9
    • 9
    • 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.

            coleenp Coleen Phillimore
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: