This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of React Cookbook: Recipes for Mastering the React Framework and have David Griffiths & Dawn Griffiths on-line!
See this thread for details.
Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Garbage Collection

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. How does garbage collection of remote objects is different from the local objects,is it also automatic?
2. Can we control garbage collection?
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vallabhaneni Suresh Kumar:
1. How does garbage collection of remote objects is different from the local objects,is it also automatic?
2. Can we control garbage collection?



1. Its not different; It is also automatic.
2. We are given some control over garbage collectors through most JVMs.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. Its not different; It is also automatic.
2. We are given some control over garbage collectors through most JVMs.



Like Mr.Gilbert said that we are given some control,but we can never directly invoke the Garbage Collectors(Neverthless we can make a call(like System.gc(),Runtime.gc()..) to invoke Garbage Collection)

other than that we have sun's Documentation for tuning Garbage Collection
http://java.sun.com/docs/hotspot/gc1.4.2/




correct me If I am wrong,Thanks

 
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Truth About Garbage Collection
Reference Objects and Garbage Collection
Garbage collection and performance
 
lowercase baba
Posts: 13001
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(Neverthless we can make a call(like System.gc(),Runtime.gc()..) to invoke Garbage Collection)



My understanding is that this does NOT invoke the Garbage Collector, but SUGGESTS to the JVM that now might be an OK time to do it. The JVM is free to ignore such requests if it feels like it.

Am I wrong in that belief?
[ September 22, 2005: Message edited by: fred rosenberger ]
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fred rosenberger:


My understanding is that this does NOT invoke the Garbage Collector, but SUGGESTS to the JVM that now might be an OK time to do it. The JVM is free to ignore such requests if it feels like it.

Am I wrong in that belief?

[ September 22, 2005: Message edited by: fred rosenberger ]



You are not wrong, but its just a technicality. The GC will in all likelyhood run, unless there is no need for it too.
 
fred rosenberger
lowercase baba
Posts: 13001
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so what good does it do to call System.gc()?

You say if i call it, and it doesn't need to run, it won't. But if it DOES need to run, it should run whether i call it or not.
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fred rosenberger:
so what good does it do to call System.gc()?

You say if i call it, and it doesn't need to run, it won't. But if it DOES need to run, it should run whether i call it or not.



well the GC can only guess. If you put in direct calls, there is no need to guess.

Typically you would tune the GC for a certain computer. But calls to gc can work no matter which computer or how much memory or how the end user has tweaked their settings. you should do both.
 
Attractive, successful people love this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic