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

JVM should return memory back to the Operating System

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      Name: rmT116609 Date: 09/22/2004


      A DESCRIPTION OF THE REQUEST :
      The memory usage of the JVM should be dynamic. The "-Xmx" option just sets a maximum limit. If the application exceeds this limit an OutOfMemoryError occurs. Once occupied memory is not returned back to the operating system. For multithreaded server applications, this can easily lead to an OutOfMemoryErrror and the application basically crashes (because it can't perform the tasks without memory).


      JUSTIFICATION :
      If the JVM would take as much memory as it can get from the OS (only if required), there would be no need for the fixed "-Xmx" maximum memory option. If the JVM would return unused memory back to the operating system, the application would just have some times that it uses much memory (eventually slowing down the server through swapping) and afterwards performs nicely again (because it doesn't need to swap anymore).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Memory usage of java applications (java.exe) not only increases but also decreases.
      ACTUAL -
      Memory usage of java applications just increases (perhaps leading to an OutOfMemoryError), with the result that other applications on the server get less memory and never have a chance to get more.
      (Incident Review ID: 311498)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nigottiorcl Nikolay Igotti (Inactive)
                Reporter:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: