Defined Free Memory and GC Using JSR 308

Suminda Dharmasena sirinath at sakrio.com
Fri May 3 08:31:09 UTC 2013


Hi,

Java can eliminate much of its reliance on GC using annotations for GC.

Many local objects can be collected without GC using C++ style delete by
the compiler (transparent to user) if it does not escape current context.
If the containing / aggregated objects live longer then these need GC. Also
if the object out lives the current context. To ensure the GC timing and
loads are know I have beeing thingking it will be a good idea
to introduce annotations.

Possible annotation:
GCAtBlockEnd
GCAtBlockExit - for loops the GC happens when the
GCAtLastReference
GCAtEndOfScope
GCOnAssignment
GCOnReturn
GCOnGCOfContainingObject - GC on GC of aggregate / composing object
GCOnStatementCompletion - GC parameters and return value (if not assigned)
of a call when the function returns. Need to support statement level
annotations.
GCOnLastResort - Only GC at last resort before outofmemory exception -
class level
ExcludeFinalising - prevent finalizers running on the object - class level
GCUsingCurrentThread
GCUsingDefaultThread
GCUsingNewThread(Priority = n)
GCUsing(GCSystem) - all objects created in the specified scope will be GCed
using specified GC - annotations need to support static references
GCSuspend - a synchronous object can be used so that the GC threads do not
run while the code block is executing

Suminda
--
Suminda Sirinath Salpitikorala Dharmasena, B.Sc. Comp. & I.S. (Hon.) Lond.,
P.G.Dip. Ind. Maths. J'Pura, MIEEE, MACM, CEO Sakrīō! ▣ *Address*: 6G • 1st
Lane • Pagoda Road • Nugegoda 10250 • Sri Lanka. ▣ *Mobile*
: +94-(0)711007945 ▣ *Tele*: +94-(0)11-5 864614 / 5 875614 / 2 825908 ▣ *Web
*: http://www.sakrio.com ▣

This email is subjected to the email Terms of Use and Disclaimer:
http://www.sakrio.com/email-legal. Please read this first.
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130503/26f40713/attachment.htm>


More information about the hotspot-gc-dev mailing list