Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asyncronous gc

Posted on 2002-06-06
4
Medium Priority
?
207 Views
Last Modified: 2010-03-31
Hi All,

I was using the -asyncgc option in jdk1.1.6 to issue the asynchronous garbage collection.
But now, i beleive that, the option is not there in higher versions of the jdk.

So, what should i do to have  the asychronous garbage collection??????
0
Comment
Question by:kulsmadya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Ovi earned 1200 total points
ID: 7061150
This is the documentation of the native method gc() from Runtime class. (As you probably know in the System.gc() method, there is only a call to this one Runtime.getRuntime().gc();)
    /**
     * Runs the garbage collector.
     * Calling this method suggests that the Java virtual machine expend
     * effort toward recycling unused objects in order to make the memory
     * they currently occupy available for quick reuse. When control
     * returns from the method call, the virtual machine has made
     * its best effort to recycle all discarded objects.
     * <p>
     * The name <code>gc</code> stands for "garbage
     * collector". The virtual machine performs this recycling
     * process automatically as needed, <b>IN A SEPARATE THREAD</b>, even if the
     * <code>gc</code> method is not invoked explicitly.
     * <p>
     * The method {@link System#gc()} is the conventional and convenient
     * means of invoking this method.
     */

    public native void gc();
0
 
LVL 7

Expert Comment

by:yoren
ID: 7061192
Automatic garbage collection is always asynchronous now.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 7061258
From my above comment : "The virtual machine performs this recycling process automatically as needed, <b>IN A SEPARATE THREAD</b>".

A separated thread means asynchronus in this case.
0
 
LVL 7

Expert Comment

by:yoren
ID: 7061264
I agree. Ovi answered correctly first and deserves the points.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question