Date: Mon, 26 Nov 2001 10:09:49 +0100 From: Ernst de Haan <znerd@freebsd.org> To: huang wen hui <huanghwh@yahoo.com>, freebsd-java@freebsd.org Subject: Re: GC is not work in jdk1.3.1p5+OpenJIT1.1.16 Message-ID: <200111260909.fAQ99ni77462@zaphod.euronet.nl> In-Reply-To: <20011125061021.71089.qmail@web20410.mail.yahoo.com> References: <20011125061021.71089.qmail@web20410.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111260909.fAQ99ni77462>
