https://issues.apache.org/bugzilla/show_bug.cgi?id=46863





--- Comment #4 from Helder Magalhães <[email protected]>  2009-04-20 
06:40:17 PST ---
(In reply to comment #3)
> Here is a test case that results in the OOM exception after running for about
> 10 minutes on my computer:
> 
[...]
>         for (;;) {
>             //for (int i = 0; i < 200; i++) //20
>             svgGraphics.drawImage(bi, bio, 0, 0);
>             //System.gc(); //22
>         }
[...]
> 
> If lines 20 and 22 are uncommented, then the program seems to run forever. I
> did not experience an OOM exception after running the program for more than an
> hour.

As far as I know, automatic GC is a low priority task which runs in the
background. As you are running this within an infinite loop ("for (;;)"), the
GC will probably never be allowed a chance to run and therefore the OOM error.

Also, the fact that explicitely invoking GC seems to work around the issue
makes me suggests that this may be an invalid report: it hints that the thing
is being garbage collected, maybe just not fast enough. On the other hand, you
may not have tested this enough (more than one hour may not have been enough).

I'd suggest making a few experiments (leaving the test application run
overnight, using the verbose GC switches [1], etc.) and report results back.
There's an interesting article [1] on GC tuning you may be interested in. ;-)

[1] http://www.petefreitag.com/articles/gctuning/

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to