From owner-freebsd-java Mon Nov 26 1: 9:56 2001 Delivered-To: freebsd-java@freebsd.org Received: from zaphod.euronet.nl (zaphod.euronet.nl [194.134.128.241]) by hub.freebsd.org (Postfix) with ESMTP id 9138237B417 for ; Mon, 26 Nov 2001 01:09:50 -0800 (PST) Received: (from ernst@localhost) by zaphod.euronet.nl (8.11.6/8.11.6) id fAQ99ni77462; Mon, 26 Nov 2001 10:09:49 +0100 (CET) (envelope-from ernst) Message-Id: <200111260909.fAQ99ni77462@zaphod.euronet.nl> Content-Type: text/plain; charset="iso-8859-1" From: Ernst de Haan To: huang wen hui , freebsd-java@freebsd.org Subject: Re: GC is not work in jdk1.3.1p5+OpenJIT1.1.16 Date: Mon, 26 Nov 2001 10:09:49 +0100 X-Mailer: KMail [version 1.3] References: <20011125061021.71089.qmail@web20410.mail.yahoo.com> In-Reply-To: <20011125061021.71089.qmail@web20410.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I think submitting a PR with a CC to both java@freebsd.org and the maintainer of the corresponding port is the right thing to do. Ernst On Sunday 25 November 2001 07:10, huang wen hui wrote: > hi, > Here is the sample code: > ----------------------------------------- > import java.util.LinkedList; > import java.util.List; > import javax.swing.event.EventListenerList; > > public class FixQueue extends Object{ > protected EventListenerList listenerList = new > EventListenerList(); > > private FixQueueException fixQueueExcep > = new FixQueueException("Queue's > MaxQueueLength is Exceed"); > private LinkedList list; > private int maxQueueSize; > protected String queueID =""; > > public FixQueue(int newMaxQueueSize, String queueID) > { > maxQueueSize = newMaxQueueSize; > this.queueID = queueID; > list = new LinkedList (); > } > > public synchronized int getListenerCount() { > return listenerList.getListenerCount(); > } > > > public void addBack(Object obj) { > list.addLast (obj); > if ( list.size () > maxQueueSize ){ > list.removeFirst (); > } > } > > protected void addBackNoNotify(Object obj){ > list.addLast (obj); > if ( list.size () > maxQueueSize ){ > list.removeFirst (); > } > } > > public Object getFront() { > return list.getFirst (); > } > > public Object getBack() { > return list.getLast (); > } > > public boolean isEmpty() { > return list.isEmpty (); > } > > public void popFront() { > list.removeFirst (); > } > > public Object at(int index) { > return list.get (index); > } > > public int getSize(){ > return list.size(); > } > > public int getMaxQueueSize(){ > return maxQueueSize; > } > > public String getQueueID(){ > return queueID; > } > > > public static void main( String[] argv ){ > FixQueue fixQueue = new FixQueue(4096,"ID"); > while(true) { > fixQueue.addBack(new byte[4096]); > } > } > > } > > class FixQueueException extends Exception { > > public FixQueueException() { > super(); > } > > public FixQueueException(String s) { > super(s); > } > } > ----------------------------------------- > when run under jdk1.3.1p5 that enable OpenJIT1.1.16, > the program will eat a lot of memory as posible as it > can. and error msg is : > Exception in thread "main" > java.lang.StackOverflowError > at > java.util.LinkedList.addBefore(LinkedList.java, > Compiled Code) > at > java.util.LinkedList.addLast(LinkedList.java, Compiled > Code) > at FixQueue.addBack(FixQueue.java, Compiled > Code) > at FixQueue.main(FixQueue.java, Compiled Code) > > > If disable OpenJIT, it worked as expected. > > --hwh > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message -- Ernst de Haan EuroNet Internet B.V. "Come to me all who are weary and burdened and I will give you rest" -- Jesus Christ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message