Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Languages Misc > Re: GC Design Q...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 10 Topic 1122 of 1217
Post > Topic >>

Re: GC Design Question

by Waldek Hebisch <hebisch@[EMAIL PROTECTED] > Mar 26, 2008 at 06:20 PM

Pie Squared <PieSquared@[EMAIL PROTECTED]
> wrote:
> Is it possible to make a conservative moving GC?
> 

Depends on what you consider to be a conservative GC and what you
consider a moving GC.  I do not think that purely conservative
GC can be moving -- by purely convervative I mean that all
pointers you see are only potential pointers and the only assumption
on code is that all pointers are visible (and I assume conventional
architecture).

But there are useful partially convervative collectors.  Namely,
if heap objects are tagged, then you can precisely identify pointers
contained in a given object and you can safely update them.  At first
glance this looks like a precise collector.  But root pointers may
be only potential pointers.  For example, if you allow starting
garbage collection from an interrupt handler, then you may not
know which machine registers are pointers and which are integeres.
If you use C as intermediate language, then probably all words
on the C stack are potential pointers.  In such sitation reasonable
policy is to keep fxed all objects referenced by potential pointers,
but to move live objects unreferenced by any potential pointer.

AFAIK such method is used in some Lisp implementations.  Namely,
sbcl GC is conservative with respect to machine registers, but
precise otherwise.  Also gcl knows that at GC time some objects
can not have references from the stack, so it moves them (but
some kinds of objects are never moved).

-- 
                              Waldek Hebisch
hebisch@[EMAIL PROTECTED]

 




 10 Posts in Topic:
GC Design Question
Pie Squared <PieSquare  2008-03-20 15:04:31 
Re: GC Design Question
Nils M Holm <news2008@  2008-03-21 06:49:24 
Re: GC Design Question
"Aaron Gray" &l  2008-03-22 21:08:47 
Re: GC Design Question
Hallvard B Furuseth <h  2008-03-23 20:08:15 
Re: GC Design Question
Friedrich Dominicus <j  2008-03-24 07:48:59 
Re: GC Design Question
Hallvard B Furuseth <h  2008-03-25 17:05:11 
Re: GC Design Question
Hallvard B Furuseth <h  2008-03-25 17:06:18 
Re: GC Design Question
"cr88192" <c  2008-03-23 10:47:39 
Re: GC Design Question
torbenm@[EMAIL PROTECTED]  2008-03-25 16:02:48 
Re: GC Design Question
Waldek Hebisch <hebisc  2008-03-26 18:20:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:39:33 CDT 2008.