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

ZGC: Windows heap unreserving is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 17, 21, 24
    • hotspot
    • gc
    • b18
    • windows

      When unreserving memory we use VirtualFreeEx with the MEM_RELEASE flag. The API documentation states:
      ```
      If the dwFreeType parameter is MEM_RELEASE, dwSize must be 0 (zero)
      ```

      but our implementation passes in the expected size instead of 0.

      Generational ZGC isn't affected by this because we never unreserve any heap memory. However, there are coming changes to NUMA support that starts to unreserve excess memory.

      In older releases in Single-gen ZGC, we have paths that do call unreserve in certain corner-cases during startup, so this fix should probably be backported to those releases.

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

              Created:
              Updated:
              Resolved: