# 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".
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".