You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Igor V. Stolyarov (JIRA)" <ji...@apache.org> on 2006/10/05 16:07:19 UTC

[jira] Created: (HARMONY-1727) [DRLVM] [GC] Unexpected behaviour of GC

[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

        

[jira] Updated: (HARMONY-1727) [DRLVM] [GC] Unexpected behaviour of GC

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1727?page=all ]

Geir Magnusson Jr updated HARMONY-1727:
---------------------------------------

    Component/s: DRLVM

> [DRLVM] [GC] Unexpected behaviour  of GC
> ----------------------------------------
>
>                 Key: HARMONY-1727
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1727
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            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