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


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

              Created:
              Updated:
              Resolved: