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]

Re[2]: initiate garbage collector under gcj


Is this a single 1 GB object, or a data structure which totals 1 GB?
If the former, can you avoid it?

It is generally hard to guarantee that a single object will be collected
at a given point in time.  A copy of the reference may still be in a
register somewhere, and be seen by the collector.  The gcj collector
is conservative, and with a 1GB object on a 32-bit machine, there is also
a very large probablility that some other piece of data would be
misinterpreted as a reference to that object.  If at all possible,
you should avoid objects of that size, especially on a 32-bit machine.

The easiest way to see whether collections are triggered is to define
the GC_PRINT_STATS environment variable.

Hans

On Mon, 21 Feb 2005, Yura Smolsky wrote:

> Hello, Tom.
>
> >>>>>> "Yura" == Yura Smolsky <info@altervision.biz> writes:
>
> Yura>> How can I manually initiate process of garbage collecting under gcj?..
>
> TT> You can call System.gc().  Like other JVMs, this isn't guaranteed to
> TT> have an effect.
>
> Yeah. It does not help :) I am talking about PyLucene's object.
> PyLucene is java library ported to python through gcj.
>
> When I do create big sized (1Gb) object in memory and then delete all
> references to it then objects is still in memory, even after some
> time/operations...
>
>
> Yura Smolsky.
>
>
>


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