This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: New collector
- To: tromey at cygnus dot com
- Subject: Re: New collector
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Tue, 02 Nov 1999 14:28:56 +1300
- CC: Java Patch List <java-patches at sourceware dot cygnus dot com>
- References: <87ln8holxi.fsf@cygnus.com>
Tom Tromey wrote:
> I'm committing a new garbage collector from Hans Boehm. It is 5.0alpha4.
> The changes are large enough that I'm not going to post them.
> Please give it a try.
Tom, after building this (and the cleanup patch), anything that does any
significant allocation seems to lock up totally on my system - I have to kill -9
the process.
eg:
public class ByteAlloc3
{
static final String str = "blah blah blah blah blah blah blah blah ...";
public static void main (String args[])
{
System.out.println("Running...");
while(true)
{
long startTime = System.currentTimeMillis();
for (int i=0; i<10; i++)
{
byte bufs[][] = new byte[20000][];
for (int j=0; j<bufs.length; j++)
{
bufs[j] = str.getBytes();
}
}
long stopTime = System.currentTimeMillis();
System.out.println("Time to alloc="+ ((stopTime - startTime)));
System.out.print("heap total=" + (Runtime.getRuntime().totalMemory() / 1024)
+ "K");
System.out.println(" free=" + (Runtime.getRuntime().freeMemory() / 1024) +
"K");
}
}
}
Is anyone else seeing this or did I do something silly?
regards
[ bryce ]