From: Samuele P. <ped...@bl...> - 2003-06-30 15:56:19
|
At 09:31 30.06.2003 -0400, Birkinbine, Brian wrote: >Hello, > >I'm having problems releasing memory using jython with java objects. > >I have an infinite loop where I read in XML files from a directory, process >the XML files using XSLT to create new XML files in another directory. I >then wait x number of seconds (in this case 1 hour) before checking for more >files to be processed. > >I've seen cases where my program will use around 500meg of memory if it >processes a larger XML file (around 100meg), but during future file >processing it holds onto the 500meg for much smaller XML file processing >(less than 1meg). > >I've tried using the del keywork for my java objects, and I've also tried >calling java.lang.System.gc() without success at releasing the memory. > >Here are the java classes I'm using. >java.util.Properties (to read from properties file for configuration) >javax.xml.transform.stream.StreamSource for the XML input, output, and XSLT >source. >javax.xml.transform.TransformerFactory.newInstance() and >javax.xml.transform.Transformer.newTransformer() for XSLT. > >Thanks, >Brian Birkinbine I don't think it has something to do with Jython. I would not be surprised if after processing 100mb the JVM is holding onto 500mb of OS mem. To check, as you did, use del, java.lang.System.gc() and then print java.lang.Runtime.getRuntime().freeMemory() java.lang.Runtime.getRuntime().totalMemory() regards. |