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

J2SE 1.4: excessive of memory needed to run "nothing" in Java

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      # java -version
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
      # swap -s (before running java)
      total: 10176k bytes allocated + 2400k reserved = 12576k used, 840288k available
      # more nothing.java
      import java.io.*;
      import java.lang.Thread;
      public class nothing
      {
        public static void main(String[] args)
        {
          try
          {
            while ( true )
            {
              java.lang.Thread.sleep( 1000 );
              System.out.print(".");
            }
          }
          catch ( java.lang.InterruptedException e ) { }
        }
      }
      # java nothing
      .......

      another window# ps -eo pid,pcpu,vsz,args | grep java
        263 1.5 52256 java nothing
        264 0.0 1000 grep java
       # swap -s (after starting java...)
      total: 17592k bytes allocated + 9008k reserved = 26600k used, 825336k available



      From this example, 52MB is memory is necessary to run "nothing".

        Attachments

          Activity

            People

            • Assignee:
              psoper Pete Soper (Inactive)
              Reporter:
              jwbuckle Joel Buckley (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: