This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: New collector


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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]