aspose file tools
The moose likes Java in General and the fly likes Garbage Collection to be turned off Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Garbage Collection to be turned off" Watch "Garbage Collection to be turned off" New topic
Author

Garbage Collection to be turned off

Amit Sing
Greenhorn

Joined: Oct 13, 2004
Posts: 3
hi,

I am developing a project which does not need garbage collection.
Could someone please let me know how to do it..

There are two options to jre for this (noasyncgc,noclassgc)

However, no classgc can be used only for a single class which would be the main application class.

I am totally confused about this. Could you plz direct me abt this?
Rob Shields
Greenhorn

Joined: Oct 11, 2004
Posts: 19
Are you sure you don't need garbage collection? What is to be gained by turning it off if it's not required?
Amit Sing
Greenhorn

Joined: Oct 13, 2004
Posts: 3
Hi,

My application is a real time application and since garbage collection is unpredictable, it is posing problems.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
I think there will be problems without GC. The memory will be never deallocated.
General rule is GC is running if you are gonna out ouf memory, if your application need so small memory, that don't need it, than the GC will be probably never started.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Amit Sing
Greenhorn

Joined: Oct 13, 2004
Posts: 3
Hi,

I tried using -noasyncgc option but it is no longer supported. Please help me out here people!
saran ram
Ranch Hand

Joined: Dec 13, 2002
Posts: 69
Hi,

I don't think you can or need to use -noasyncgc anymore.

Try this link:
http://java.sun.com/developer/onlineTraining/Security/Fundamentals/Security.html

Hope this helps!
Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
How can you not use garbage collection?Java does not have manual memory allocation-deallocation ac C++.What'll you do about the objects that your program will make?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Take a look at https://rtsj.dev.java.net/


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Garbage Collection to be turned off
 
Similar Threads
Question about Garbage collection from ExamLab diagnostic Test
Once more CLEAN BOWLED in Garbage collection
Garbage Collection Q
Garbage collection
garbage collection