javax GC API

Suminda Dharmasena sirinath at sakrio.com
Fri Apr 19 09:59:32 UTC 2013


Hi,

Not creating an object will not help. Objects created before can be GCed.
The block will suspend GC block until the block exists or until just before
OutOfMemory exception is raised.

Also this can allow API based GC and processing of GC related annotations.

There are times where you cannot afford to have a sizable GC pause.

S
--
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. ▣ *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.
--


On 19 April 2013 15:20, Kirk Pepperdine <kirk at kodewerk.com> wrote:

> Hi Suminda,
>
> With all due respect, I'm not sure that it's a great idea to pass control
> of the garbage collectors over to the programmer. In this case, if you were
> to ensure that GC did not happen during the execution of a block you are in
> danger of filling heap. A better way to prevent GC is to not create objects.
>
> Regards,
> Kirk
>
> On 2013-04-19, at 11:10 AM, Suminda Dharmasena <sirinath at sakrio.com>
> wrote:
>
> Another potential tag to ensure GC does not happen during the execution of
> a code block:
>
>    - GCSuspend - a synchronous object can be used so that the GC threads
>    do not run while the code block is executing
>
> Of course some revision to current annotations will be needed
> to accommodate this.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130419/a26258ab/attachment.htm>


More information about the hotspot-gc-dev mailing list