Tue, 14 Jul 2009 20:02:38 +0200

Related articles |
---|

Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-12) |

Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-13) |

Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-13) |

Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-13) |

Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-14) |

Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-14) |

Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-14) |

Re: Best Ref-counting algorithms? georgeps@xmission.com (GPS) (2009-07-14) |

Re: Best Ref-counting algorithms? gneuner2@comcast.net (George Neuner) (2009-07-14) |

Re: Best Ref-counting algorithms? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-07-15) |

Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-14) |

Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-15) |

Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-15) |

[27 later articles] |

From: | Hans Aberg <haberg_20080406@math.su.se> |

Newsgroups: | comp.compilers |

Date: | Tue, 14 Jul 2009 20:02:38 +0200 |

Organization: | Aioe.org NNTP Server |

References: | 09-07-018 09-07-023 09-07-027 |

Keywords: | GC |

Posted-Date: | 14 Jul 2009 14:23:17 EDT |

Christoffer LernC6 wrote:

*>> It depends on what resources you want to collect, and what*

*>> implementation language you are choosing.*

*>*

*> I'm playing around with a ref-counting based (memory) GC for a*

*> language I have yet to construct.*

But what language are you planning use for the implementation? If you

choose C++, then it is hard to find the root set. Suppose you create

object for use in your language; then global objects and those in th

stack should be registered somehow for the tracing, but those on the

heap should not, as the are live when they can be traced from the other.

Therefore, one candidate for C++ might be a conservative GC, which is

implemented in a layer between the platform and the language, trying to

find out a conservative estimate of dead pointers. That is, not

necessarily collecting all.

I'm looking at the C++ draft "n2798.pdf", ch. 20.8, and it does not seem

to provide a means to find the root set. There are some "smart pointer"

classes, which seems to be just ordinary reference counts.

Anyway, even if you do not plan to use C++, perhaps it gives some input.

Hans

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.