You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Volosyuk (JIRA)" <ji...@apache.org> on 2007/01/31 10:15:05 UTC
[jira] Commented: (HARMONY-1727) [drlvm][gc] Unexpected behaviour
of GC
[ https://issues.apache.org/jira/browse/HARMONY-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468948 ]
Ivan Volosyuk commented on HARMONY-1727:
----------------------------------------
The problem is not in GC. It does exactly what it can. The problem in TM implementation which consumes a lot of memory.
> [drlvm][gc] Unexpected behaviour of GC
> ---------------------------------------
>
> Key: HARMONY-1727
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.