Re: garbage collector for Java on TINI

Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]> Thu, 10 Jun 2004 08:51:55 -0500
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
[email protected] wrote:
> When runnin our Java application on TINI, we frequently experienced
> performance dips.
> These happen very irregularly, and are apparently due to the garbage
> collector. Triggering the garbage collector periodically by means of the
> System.gc() method slightly helps, but you can never gain ful control,
> you never know when it will actually run.
> According to me, this is a major obstacle when running real time
> applications. There must be a way to control this?
> Can anyone give me a clue ?
> I would be grateful

You can set your process priority higher than the garbage collector. 
However, if the process consumes memory and never sleeps, the GC will 
never be allowed to run and the application will receive an 
OutOfMemoryError and die.

I suggest also auditing the application code to reuse objects as much as 
possible and reduce usage of strings and other data types that wildly 
allocate memory.

-- 
--
Bryan Armstrong
bryan.armstrong-6tN4nzCoH/[email protected]

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini