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

Runtime.gc() reduces free memory

XMLWordPrintable

    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      Source:
      public static void main(String[] args) {
      Runtime runtime = Runtime.getRuntime();
      System.out.println(runtime.freeMemory());
      runtime.gc();
      System.out.println(runtime.freeMemory());
      }
      Output:
      65177344
      7649904



      FREQUENCY : always


            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: