harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Afremov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
Date Thu, 14 Dec 2006 16:32:21 GMT
[classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
-------------------------------------------------------------------------------------

                 Key: HARMONY-2718
                 URL: http://issues.apache.org/jira/browse/HARMONY-2718
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Pavel Afremov
         Attachments: ZipDictionaryTest.java

The following test is source of  memory leak (in classlib native code conceivably) and uncaught
OutOfMemoryError.

import java.util.zip.Deflater;

public class ZipDictionaryTest {
    private static final int MAX_ITERATION_NUMBER = 30000000;
    private static final int PRINT_ITERATION_NUMBER = 500000;
    private static final int DICTIONARY_SIZE = 100;

    public static void main(String[] args) {
        Deflater compresser = new Deflater();
        byte[] dictionary = new byte [DICTIONARY_SIZE];

        for (int i = 0; i < MAX_ITERATION_NUMBER;) {
            System.out.println("Iteration = " + i);

            for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
                compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
            }
        }

        System.out.println("PASS");
    }
}


-- 
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