You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by "Wang, XD (Xiao)" <X....@dl.ac.uk> on 2003/10/22 16:12:34 UTC

How to released occupied memory

Hi All

I am running an example code of Xindice 1.0. The source code is
java/examples/guide/src/org/apache/xindice/examples/Example1.java, but with
multi-loops. I noted the memory in xindice db side occupied more and more
during looping. Only the running finished, the occupied memory released. 
So if running more loops, a OutOfMemoryError Exception happened. 

Any idea? How to solve it?

Thanks

Xiao


Re: How to released occupied memory

Posted by JC Tchitchiama <jc...@panonet.net>.
Xiao,

If it's only for testing you can try

1) grab more memory when you start the process increase the heap size setting
-Xms96M -Xmx512M

2) switch to a more aggressive garbage collection (GC)
-Xincgc (Sun/Blackdown) or -Xgcpolicy:optavgpause (IBM)

3) you can even invoke the GC yourself

On Wednesday 22 Oct 2003 3:12 pm, Wang, XD (Xiao) wrote:
> Hi All
>
> I am running an example code of Xindice 1.0. The source code is
> java/examples/guide/src/org/apache/xindice/examples/Example1.java, but with
> multi-loops. I noted the memory in xindice db side occupied more and more
> during looping. Only the running finished, the occupied memory released.
> So if running more loops, a OutOfMemoryError Exception happened.
>
> Any idea? How to solve it?
>
> Thanks
>
> Xiao

-- 

Best Regards.

JC.
           \\- - -//
          (  @ @  )
===oOOo-(_)-oOOo=================================================
      jct@panonet.net
=================================================================