This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj: mem leaks & speed.
For a memory allocation performance comparison, try something
(slightly) more realistic, like this:
public class Leak {
static Leak head;
Leak prev;
Leak ()
{
prev = head;
head = this;
}
static final int iters = 1000000;
public static void main(String[] argv) {
long start = System.currentTimeMillis();
for (int i = 0;; i++) {
Leak l = new Leak();
if (i % iters == 0) {
long curr = System.currentTimeMillis();
System.out.println(i / iters + ": " + (curr - start));
head = null;
}
}
}
}