From owner-freebsd-java@FreeBSD.ORG Fri Feb 22 05:42:08 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24BA616A404 for ; Fri, 22 Feb 2008 05:42:08 +0000 (UTC) (envelope-from mika@async.caltech.edu) Received: from async.async.caltech.edu (async.async.caltech.edu [131.215.39.1]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA1713C46B for ; Fri, 22 Feb 2008 05:42:07 +0000 (UTC) (envelope-from mika@async.caltech.edu) Received: from camembert.async.caltech.edu (root@camembert.async.caltech.edu [131.215.39.91]) by async.async.caltech.edu (8.11.0/8.11.0) with ESMTP id m1M5g7042745; Thu, 21 Feb 2008 21:42:07 -0800 (PST) (envelope-from mika@camembert.async.caltech.edu) Received: from camembert.async.caltech.edu (k-9@localhost [127.0.0.1]) by camembert.async.caltech.edu (8.13.1/8.13.1) with ESMTP id m1M5g7Qq085021; Thu, 21 Feb 2008 21:42:07 -0800 (PST) (envelope-from mika@camembert.async.caltech.edu) Message-Id: <200802220542.m1M5g7Qq085021@camembert.async.caltech.edu> To: Nick Johnson In-Reply-To: Your message of "Thu, 21 Feb 2008 19:05:02 PST." <20080221190430.U2617@turing> Date: Thu, 21 Feb 2008 21:42:07 -0800 From: Mika Nystrom Cc: freebsd-java@freebsd.org Subject: Re: Memory leak in 1.5.0 JVM X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:42:08 -0000 Nick Johnson writes: >What happens if you add a thread.join()? > > Nick What do you know.. the leak goes away. Also the program uses 1/3 as much memory to start with (RES: 12M vs. 40M). Mika > >On Thu, 21 Feb 2008, Mika Nystrom wrote: > >> Hello there freebsd-java, >> >> I am running a binary downloaded 1.5.0 JVM on a FreeBSD 5.5 system: >> >> (167)rover:~/levinc/memleak>java -version >> java version "1.5.0" >> Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) >> Java HotSpot(TM) Client VM (build diablo-1.5.0_07-b01, mixed mode) >> (168)rover:~/levinc/memleak>uname -a >> FreeBSD rover 5.5-RELEASE FreeBSD 5.5-RELEASE #4: Sat Nov 17 12:13:24 PST 2007 mika@rover:/usr/src/sys/i386/compile/ROVER i386 >> >> I have found the following program to leak memory on FreeBSD, but not on Windows with same Java 1.6.0, nor on Debian with gij 1.4.2: >> >> class Leakq { >> >> private static class MyThread extends Thread { >> public void run() >> { >> >> } >> } >> >> public static void main (String[] args) >> { >> for(;;) { >> (new MyThread()).start(); >> } >> } >> } >> >> Best regards, >> Mika Nystrom >> mika@alum.mit.edu >> _______________________________________________ >> freebsd-java@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-java >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> > >-- >"Courage isn't just a matter of not being frightened, you know. It's being > afraid and doing what you have to do anyway." > Doctor Who - Planet of the Daleks >This message has been brought to you by Nick Johnson 2.3b1 and the number 6. >http://healerNick.com/ http://morons.org/ http://spatula.net/