To get a better idea of how much memory is actually in use by your
application you need to force the garbage collector to run.  Even if the JVM
is idle, it may not run and thus the heap is still full of "freed" objects.
One nice way force the garbage collector to run is to use a memory profiler
like OptimizeIt.  OptimizeIt allow you to run the grabage collector with a
click of a button and see the the heap size decrease graphically.  You may
also be able to use JMP (http://www.khelekore.org/jmp) which is Open Source.

Mike Bresnahan

"Damon Horrell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have written a little server program that uses a Templates object to
avoid
> reparsing my XSLT each time I want to process a document.  I am finding
that
> it chews up an awful lots of memory (like 100+ Mb) though which does not
get
> released when the transformation is finished.  If I process the same
> document a few times the memory increases and then remains static after
> about the 3rd time, but it grows higher still if I process other
documents.
>
> I am not sure if this is because it is caching the source document or
> something. I have experimented with noth XPathContext.release and
> SourceTreeManager but to no effect.
>
> I don't want anything other than the Templates object to be retained in
> memory after each transformation is run.
>
> Does anybody know where the memory goes and how I can release it?
>
> Has anyone else sucessfully written a similar application to efficiently
> process multiple source documents through the same transformation?
>
> Thanks, Damon
>
>



Reply via email to