This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Detecting memory leaks


Hi,

are there any easy to use tools for finding gcj memory leaks, especially
on ARM/XScale? For example the following code seems to leak on
armv5l (gcj 3.4.0) and armv5b (gcj 3.4.2), but not on x86 (gcj 3.4.0):

import java.net.*;

public class MemLeakTest
{
    public static void main(String args[])
    {
        for(;;)
        {
            try {

            URL url = new URL("http://princess.willab.fi:8111/";);
            URLConnection conn = url.openConnection();
            System.out.println(conn.getContentType());
            conn.getInputStream().close();

            } catch(Exception e) {
                e.printStackTrace();
            }
        }

    }
}

Cheers,
  Jari

-- 
 - Jari Korva -


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]