Comment Re:Java is slow (Score 2, Informative) 632
Did anyone try running the obvious test....
You can run this till the cows come home and you won't run out of memory. Running the JVM with 64MB and -verbosegcpublic class RunLoop
{
public static void main( String[] args )
{
while ( true )
{
Object o = new Object();
o = null;
}
}
}
As you can see: ....
[GC 606K->94K(1984K), 0.0004234 secs]
.... quizillion times....
[GC 606K->94K(1984K), 0.0004110 secs]
....
- The VM does free memory in "real-time" ( whatever that may mean )
- The amortized amount of memory is zero ( it keeps falling back to the base 94K used for the base java classes.
Memory: 127544k/130944k available (1008k kernel code, 412k reserved, 1636k data, 64k init)
DENTRY hash table entries: 262144 (order: 9, 2097152 bytes)
Buffer-cache hash table entries: 131072 (order: 7, 524288 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
VFS: Diskquotas version dquot_6.4.0 initialized
CPU: Intel Pentium III (Katmai) stepping 03