Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

how  garbage collection works

Thread view: 
sam - 12 Nov 2005 03:15 GMT
can anybody  tell me how garbage collection works
Andrew Thompson - 12 Nov 2005 03:23 GMT
> can anybody  tell me how garbage collection works

Yes*.  Whether they will be willing to spoon feed the information
to you, is another matter.

What do you know so far?  What is your specific question or
current understanding?

* My answer is 'pretty well - so long as you don't hang on
to references to objects', but ..there are other answers.
Roedy Green - 12 Nov 2005 03:39 GMT
>can anybody  tell me how garbage collection works

see http://mindprod.com/jgloss/gc.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Smith - 12 Nov 2005 03:43 GMT
> can anybody  tell me how garbage collection works

Good question.  There's no possible way someone from USENET could answer
it suitably.  If you want to know, there are two sources of information
that I'd recommend:

A book:

   Garbage Collection: Algorithms for Automatic Dynamic Memory Mgmt
   Richard Jones and Rafael Lins

A paper:

   Uniprocessor Garbage Collection Techniques
   Paul Wilson
   Expanded version, ACM Computing Surveys
   ftp://ftp.cs.utexas.edu/pub/garbage/bigsurv.ps

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Chris Smith - 12 Nov 2005 04:05 GMT
> > can anybody  tell me how garbage collection works

Incidentally, I assume you meant "Can anyone tell me the programming
techniques used to implement garbage collection, in general?"

It's possible you meant something else by your questions.  For example:

   * What is garbage collection?
   * What behavior should I expect to observe from GC in Java?
   * I'm an expert in GC and need the techniques used by the JVM.

In these cases, you won't find help in any of the sources I mentioned.  
Neither of them even mentions Java, to the best of my knowledge, so they
can't speak to the spec's guaranteed behavior nor to any implementations
of the Java platform.  They also assume you already know what garbage
collection is.

If you meant one of the other questions and no other answers help,
please feel free to let us know.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Roedy Green - 12 Nov 2005 04:25 GMT
>Good question.  There's no possible way someone from USENET could answer
>it suitably.  If you want to know, there are two sources of information
>that I'd recommend:

It is not odd that people who understand the intricacies of Garbage
Collection algorithms are considered the acme of programmers.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Uppal - 12 Nov 2005 10:40 GMT
> can anybody  tell me how garbage collection works

If you are looking for a simple answer, then Kieron Briggs posted rather a good
metaphor some time back.  See:

http://groups.google.com/group/comp.lang.java.programmer/msg/7889879d8cbb089f

This you /aren't/ looking for a simple answer, then Chris Smith has already
covered the bases.

   -- chris
Roedy Green - 12 Nov 2005 13:56 GMT
On Sat, 12 Nov 2005 10:40:24 -0000, "Chris Uppal"
<chris.uppal@metagnostic.REMOVE-THIS.org> wrote, quoted or indirectly
quoted someone who said :

>http://groups.google.com/group/comp.lang.java.programmer/msg/7889879d8cbb089f
>
>This you /aren't/ looking for a simple answer, then Chris Smith has already
>covered the bases.

ut in Java, we have a Garbage Collector. This is a little dude in
overalls that climbs down a special Staff Only Thread, sweeps up all
the broken Objects on the floor, and shovels them into the
incinerator. You  never know exactly when he's going to come along,
but he's always there  keeping an eye on the mess on the floor to make
sure that it doesn't  fill up too much...

The problem is the objects DON'T naturally fall to the floor. GC is
about tracing the root to the branches to see what is still alive.
Perhaps a copy collector would be easier to understand, copying only
the objects still properly attached to a new room,  shaking off the
dead wood, then turning on a blast furnace in the old one to vaporise
anything in it.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.