Solved

asyncronous gc

Posted on 2002-06-06
4
204 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 300 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hibernate example using maven 12 113
servlet and mdb, jms error 1 83
import as existing maven project 3 78
How to log java errors in tomcat 8 39
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

752 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