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

VM does not release memory with MallocMaxTestWords flag.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 11
    • 9
    • hotspot
    • None

      VM behavior is not correct with -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=.... Allocated memory is not released.

      Use attached AllocObject.java to reproduce this issue:

      java -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=10m -XX:+UseG1GC -Xmx25m AllocObjects

      VM crashes with message:
      # There is insufficient memory for the Java Runtime Environment to continue.
      # Native memory allocation (malloc) failed to allocate 4092 bytes for AllocateHeap
      # An error report file with more information is saved as:
      # /home/cmv/tmp/hs_err_pid16722.log

      -XX:MallocMaxTestWords can be 100m or 256m - it affects test execution time.

      hs_err for G1GC and ParallelGC are attached.

        1. hs_err_pid16783.log_parallelgc
          31 kB
          Michail Chernov
        2. hs_err_pid16748.log_g1gc
          30 kB
          Michail Chernov
        3. AllocObjects.java
          0.5 kB
          Michail Chernov

            Unassigned Unassigned
            mchernov Michail Chernov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: