0 Replies Latest reply: May 13, 2010 8:31 AM by 843810 RSS

    Regarding Virtual Memory

    843810
      I simply wrote a java tester mentioned below to wait 1 minute in a thread and I found virtual memory taking more memory. Following are the results through top command.


      class test
      {
           public static void main(String args[])
           {
                try
                {
                     System.out.println("A");
                     Thread.sleep(60000);
                     System.out.println("B");
                }
                catch(Exception e)
                {
                }
           }
      }



      In JDK1.4
      VIRT RES MEM
      206m 7180 0.4%

      In JDK1.6
      VIRT RES MEM
      635m 9900 0.5%

      Could you please tell why it is taking more memory in JDK1.6.