I have a servlet that takes up about 2Mb of heap space (I found this using runtime.getMemory() - or whatever it was called), and then I display the memory used and free at the bottom of a status page. I have another servlet that takes up about 3Mb, and I am frequently recompiling this one. this unfortunately makes the total memory used in the heap go up and up every time i compile. Every so often I need to restart the whole of apache. Also it looks like the amount of space actually used by the programs remains about the same - it just allocates more and more each time. So after about the tenth recompile there is about 20Mb allocated and 10Mb free. When first loaded the servlets both fit in 5Mb! Surely this shouldn't happen. A new classloaded is instantiated so any memory allocated should be garbage collected - right? because none of those objects can exist any more anyway? Looks like something that needs looking into... I have done no fancy memory allocation or any native methods or anything special... Fix/ideas as to how to alleviate the problem would be much appreciated Simon ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
