• Post Reply Bookmark Topic Watch Topic
  • New Topic

Garbage Collection to be turned off  RSS feed

 
Amit Sing
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My application is a real time application and since garbage collection is unpredictable, it is posing problems.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Amit Sing
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried using -noasyncgc option but it is no longer supported. Please help me out here people!
 
saran ram
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at https://rtsj.dev.java.net/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!