harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1727) [DRLVM] [GC] Unexpected behaviour of GC
Date Thu, 05 Oct 2006 14:07:19 GMT
[DRLVM] [GC] Unexpected behaviour  of GC
----------------------------------------

                 Key: HARMONY-1727
                 URL: http://issues.apache.org/jira/browse/HARMONY-1727
             Project: Harmony
          Issue Type: Bug
            Reporter: Igor V. Stolyarov


GC releases memory by the wrong way

Test:
Test.java---------------------------------------------
import java.util.Vector;
import java.util.Hashtable;

class Run implements Runnable{
    int ar[];
    String content;
    public Run(){
        content = new String(".");
        ar = new int[65536];
    }
    public void run() {
        System.err.print(content);
        try{
            Thread.sleep(100);
        }catch(InterruptedException e){
            Thread.currentThread().interrupt();
        }
    }

}

public class Test {
    public static void main(String[] args) {
        while(true){
            try{

                Thread t = new Thread(new Run());
                t.start();
            }catch(OutOfMemoryError oome){
                System.gc();
                try{
                    Thread.sleep(100);
                }catch(InterruptedException e){
                    Thread.currentThread().interrupt();
                }   
            } 
        }
    }
}

On DRLVM this test  longs for to allocate all memory and then VM is crashing. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message