<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Garbage Collection: The Joy and the Curse</title>
	<atom:link href="http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/feed/" rel="self" type="application/rss+xml" />
	<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/</link>
	<description>All that is Tim Burrell</description>
	<lastBuildDate>Sun, 23 Aug 2009 15:05:43 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tim.</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-153</link>
		<dc:creator>Tim.</dc:creator>
		<pubDate>Sat, 15 Mar 2008 13:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-153</guid>
		<description>Very cool.  I&#039;m jealous.  I can&#039;t wait until I can start working on my own language too.  I keep thinking about it in the back of my head.  So far I think I&#039;d use LLVM as well -- heard nothing but good things about it.  Plus these days I understand it does a really good job at optimizing, even better than GCC.  Not too bad!  But what interests me more is the nice clean code base.  I looked into writing a front end for GCC once and it made me shake and twitch for a bit.</description>
		<content:encoded><![CDATA[<p>Very cool.  I&#8217;m jealous.  I can&#8217;t wait until I can start working on my own language too.  I keep thinking about it in the back of my head.  So far I think I&#8217;d use LLVM as well &#8212; heard nothing but good things about it.  Plus these days I understand it does a really good job at optimizing, even better than GCC.  Not too bad!  But what interests me more is the nice clean code base.  I looked into writing a front end for GCC once and it made me shake and twitch for a bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-152</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Fri, 14 Mar 2008 02:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-152</guid>
		<description>Started? Sort of. I&#039;ve started building some of the runtime (memory management, etc.), but I&#039;m waffling on the backend. LLVM is a great backend, but it&#039;s rather large. GNU Lightning is small and fast, but it&#039;s platform support is rather limited, and there are no optimizations possible with it. Decisions, decisions... :-)</description>
		<content:encoded><![CDATA[<p>Started? Sort of. I&#8217;ve started building some of the runtime (memory management, etc.), but I&#8217;m waffling on the backend. LLVM is a great backend, but it&#8217;s rather large. GNU Lightning is small and fast, but it&#8217;s platform support is rather limited, and there are no optimizations possible with it. Decisions, decisions&#8230; <img src='http://timburrell.net/smilies/yahoo_smiley.gif' alt='&#58;&#45;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#45;&#41;' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim.</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-151</link>
		<dc:creator>Tim.</dc:creator>
		<pubDate>Fri, 14 Mar 2008 00:24:06 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-151</guid>
		<description>Thanks for letting me know, the spam scrubber ate the comment because it contained too many links...   where are great by the way!  I&#039;m definitely going to look into MLKit, and I&#039;ve always wanted to sit down with objective-caml.  I also subscribed to LTU, and am currently intrigued by Felix!

Have you started your language yet?  Sounds like fun... I&#039;ve always wanted to create my own language.  Another thing on the TODO list :).</description>
		<content:encoded><![CDATA[<p>Thanks for letting me know, the spam scrubber ate the comment because it contained too many links&#8230;   where are great by the way!  I&#8217;m definitely going to look into MLKit, and I&#8217;ve always wanted to sit down with objective-caml.  I also subscribed to LTU, and am currently intrigued by Felix!</p>
<p>Have you started your language yet?  Sounds like fun&#8230; I&#8217;ve always wanted to create my own language.  Another thing on the TODO list <img src='http://timburrell.net/smilies/yahoo_smiley.gif' alt='&#58;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#41;' />.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-150</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Fri, 14 Mar 2008 00:01:38 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-150</guid>
		<description>Hmm, I posted a lengthy reply answering some of your questions, but it doesn&#039;t seem to have been posted, even though my short follow-up was. Is it undergoing moderation due to its length?</description>
		<content:encoded><![CDATA[<p>Hmm, I posted a lengthy reply answering some of your questions, but it doesn&#8217;t seem to have been posted, even though my short follow-up was. Is it undergoing moderation due to its length?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-149</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Thu, 13 Mar 2008 19:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-149</guid>
		<description>&lt;i&gt;It made me wonder if anyone’s put any of this stuff into practice yet&lt;/i&gt;

My language will feature concurrency ala Erlang, so I&#039;m probably going to implement Bacon&#039;s age-oriented on-the-fly collector. It&#039;s far less complicated than Erlang&#039;s segregated heaps. That is, unless I figure out a good way to exploit regions. :-)</description>
		<content:encoded><![CDATA[<p><i>It made me wonder if anyone’s put any of this stuff into practice yet</i></p>
<p>My language will feature concurrency ala Erlang, so I&#8217;m probably going to implement Bacon&#8217;s age-oriented on-the-fly collector. It&#8217;s far less complicated than Erlang&#8217;s segregated heaps. That is, unless I figure out a good way to exploit regions. <img src='http://timburrell.net/smilies/yahoo_smiley.gif' alt='&#58;&#45;&#41;' class='wp-smiley' width='18' height='18' title='&#58;&#45;&#41;' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-148</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Thu, 13 Mar 2008 16:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-148</guid>
		<description>The newest Ada spec, Ada 2005, actually adds support for &quot;downward closures&quot;, so you have lambdas of a sort. In traditional Ada fashion, they&#039;re syntactically a bit heavy though.

For who&#039;s using regions, I pointed you to Cyclone, and the other major project I know of is the ML Kit [1]. ML Kit is being used in embedded applications actually. These are projects that statically enforce safe memory management. Regions are CS literature&#039;s name for what are sometimes called &quot;arenas&quot;. Arenas are used in Apache, the major difference from regions being that safe deallocation of regions is statically checked.

VMalloc is definitely an interesting project, though I&#039;m not a C++ fan. I&#039;m more partial to something like Streamflow [3], which shows that a generic malloc can be just as efficient and scalable as custom allocators.

I&#039;ve been researching all this stuff to build my own language. If you&#039;re interested in languages, I highly recommend LTU [2]. As for my tools, I&#039;m unfortunately stuck with C# at the moment (with an eye towards moving to F#), but if you want to pick up a new language, I highly recommend an ML, like SML or OCaml. If you&#039;re stuck with C or C++, you should check out Felix [4].

[1] http://www.itu.dk/research/mlkit/index.php/Main_Page
[2] http://lambda-the-ultimate.org/
[3] http://www.cs.vt.edu/~scschnei/papers/ismm06.pdf
[4] http://felix.sourceforge.net/</description>
		<content:encoded><![CDATA[<p>The newest Ada spec, Ada 2005, actually adds support for &#8220;downward closures&#8221;, so you have lambdas of a sort. In traditional Ada fashion, they&#8217;re syntactically a bit heavy though.</p>
<p>For who&#8217;s using regions, I pointed you to Cyclone, and the other major project I know of is the ML Kit [1]. ML Kit is being used in embedded applications actually. These are projects that statically enforce safe memory management. Regions are CS literature&#8217;s name for what are sometimes called &#8220;arenas&#8221;. Arenas are used in Apache, the major difference from regions being that safe deallocation of regions is statically checked.</p>
<p>VMalloc is definitely an interesting project, though I&#8217;m not a C++ fan. I&#8217;m more partial to something like Streamflow [3], which shows that a generic malloc can be just as efficient and scalable as custom allocators.</p>
<p>I&#8217;ve been researching all this stuff to build my own language. If you&#8217;re interested in languages, I highly recommend LTU [2]. As for my tools, I&#8217;m unfortunately stuck with C# at the moment (with an eye towards moving to F#), but if you want to pick up a new language, I highly recommend an ML, like SML or OCaml. If you&#8217;re stuck with C or C++, you should check out Felix [4].</p>
<p>[1] <a href="http://www.itu.dk/research/mlkit/index.php/Main_Page" rel="nofollow">http://www.itu.dk/research/mlkit/index.php/Main_Page</a><br />
[2] <a href="http://lambda-the-ultimate.org/" rel="nofollow">http://lambda-the-ultimate.org/</a><br />
[3] <a href="http://www.cs.vt.edu/~scschnei/papers/ismm06.pdf" rel="nofollow">http://www.cs.vt.edu/~scschnei/papers/ismm06.pdf</a><br />
[4] <a href="http://felix.sourceforge.net/" rel="nofollow">http://felix.sourceforge.net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim.</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-147</link>
		<dc:creator>Tim.</dc:creator>
		<pubDate>Sat, 08 Mar 2008 12:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-147</guid>
		<description>Looks like Bacon&#039;s done some cool stuff.  I gave the suggested paper a quick read and looked at some of his other stuff too.

It made me wonder if anyone&#039;s put any of this stuff into practice yet (aside from Cyclone), and I didn&#039;t find much.  The only I did find is another research project from AT&amp;T called &lt;a href=&quot;http://www.research.att.com/~gsf/download/ref/vmalloc/vmalloc.html&quot; rel=&quot;nofollow&quot;&gt;vmalloc&lt;/a&gt; which is a C/C++ library for doing region-based memory management.  Looks pretty cool actually although I&#039;d be leary of using it in a production environment.

Makes me want to give ADA a try, although if I&#039;m going to adopt a new language I&#039;d like some newer language features like dynamic binding, lambas / anonymous functions, delegates, closures, etc.

I&#039;m curious, when you&#039;re programming, what set of languages / tools do you generally use?  You seem pretty up on this stuff.</description>
		<content:encoded><![CDATA[<p>Looks like Bacon&#8217;s done some cool stuff.  I gave the suggested paper a quick read and looked at some of his other stuff too.</p>
<p>It made me wonder if anyone&#8217;s put any of this stuff into practice yet (aside from Cyclone), and I didn&#8217;t find much.  The only I did find is another research project from AT&#038;T called <a href="http://www.research.att.com/~gsf/download/ref/vmalloc/vmalloc.html" rel="nofollow">vmalloc</a> which is a C/C++ library for doing region-based memory management.  Looks pretty cool actually although I&#8217;d be leary of using it in a production environment.</p>
<p>Makes me want to give ADA a try, although if I&#8217;m going to adopt a new language I&#8217;d like some newer language features like dynamic binding, lambas / anonymous functions, delegates, closures, etc.</p>
<p>I&#8217;m curious, when you&#8217;re programming, what set of languages / tools do you generally use?  You seem pretty up on this stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-146</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Fri, 07 Mar 2008 14:50:09 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-146</guid>
		<description>&lt;i&gt;I am actually a big fan of reference counting [...] I think most of the time garbage collection is overkill [...] but for many of my projects the overhead incurred with a ref-count alloc / dealloc is more desirable than the constant GC tracing step.&lt;/i&gt;

The overhead of all those increment/decrement operations is actually considerable. Bacon et al. have done some impressive research on reducing the cost of ref-counting, and they&#039;ve even designed local cycle collection algorithms to collect cyclical data structures. I&#039;ll just give you a list of all of Bacon&#039;s papers, with a recommendation that you read &quot;Efficient On The Fly Cycle Collection&quot; [1]. It&#039;s the most useful ref-counting GC I&#039;ve found so far, in particular when used as an &quot;age-oriented&quot; collector. All of Bacon&#039;s papers there are great reads.

&lt;i&gt;I’m imagining a GC with all the boons of garbage collection (automatic handling of cycles, etc) with performance characteristics similar to ref-counting. How great would that be!?&lt;/i&gt;

Regions are actually better. Much better. GC involves all sorts of hidden memory and cpu overheads, like object tags and tracing, which regions completely eliminate. See [2]. If you can use regions only, your program will be more efficient in both space and time.

[1] http://www.research.ibm.com/people/d/dfb/publications.html
[2] http://www.itu.dk/~mael/mypapers/pldi2002.pdf</description>
		<content:encoded><![CDATA[<p><i>I am actually a big fan of reference counting [...] I think most of the time garbage collection is overkill [...] but for many of my projects the overhead incurred with a ref-count alloc / dealloc is more desirable than the constant GC tracing step.</i></p>
<p>The overhead of all those increment/decrement operations is actually considerable. Bacon et al. have done some impressive research on reducing the cost of ref-counting, and they&#8217;ve even designed local cycle collection algorithms to collect cyclical data structures. I&#8217;ll just give you a list of all of Bacon&#8217;s papers, with a recommendation that you read &#8220;Efficient On The Fly Cycle Collection&#8221; [1]. It&#8217;s the most useful ref-counting GC I&#8217;ve found so far, in particular when used as an &#8220;age-oriented&#8221; collector. All of Bacon&#8217;s papers there are great reads.</p>
<p><i>I’m imagining a GC with all the boons of garbage collection (automatic handling of cycles, etc) with performance characteristics similar to ref-counting. How great would that be!?</i></p>
<p>Regions are actually better. Much better. GC involves all sorts of hidden memory and cpu overheads, like object tags and tracing, which regions completely eliminate. See [2]. If you can use regions only, your program will be more efficient in both space and time.</p>
<p>[1] <a href="http://www.research.ibm.com/people/d/dfb/publications.html" rel="nofollow">http://www.research.ibm.com/people/d/dfb/publications.html</a><br />
[2] <a href="http://www.itu.dk/~mael/mypapers/pldi2002.pdf" rel="nofollow">http://www.itu.dk/~mael/mypapers/pldi2002.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim.</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-145</link>
		<dc:creator>Tim.</dc:creator>
		<pubDate>Fri, 07 Mar 2008 11:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-145</guid>
		<description>Thanks for the info!  

I am actually a big fan of reference counting (use it all the time when doing C++ via Boost&#039;s / TR1&#039;s smart pointers).  I think most of the time garbage collection is overkill -- obviously it depends on the situation, but for many of my projects the overhead incurred with a ref-count alloc / dealloc is more desirable than the constant GC tracing step.  

I have seen some papers on real-time garbage collection (ie ensuring that the sweep phase completes or terminates within a guaranteed period of time), which is cool, but doesn&#039;t alleviate the issue, infact it actually causes a slight additional decrease in performance.

At any rate, I like both GC and ref-counting; it&#039;s just important to know when to use what.  

I have to say I enjoyed the Bacon et. al paper, thanks for sending the link!  After thinking about it, it makes perfect sense that incrememental GCs basically come down to ref-counting and the more conservative GCs do more tracing, but I never really thought about it until you mentioned that paper.

Also, your comments on region-based memory mangement were great.  The idea of using static analysis to find the earliest deallocation point for a given alloc is very enticing!  I&#039;m imagining a GC with all the boons of garbage collection (automatic handling of cycles, etc) with performance characteristics similar to ref-counting.  How great would that be!?  And I had no idea about Cyclone before -- a neat little language actually!  I&#039;m convinced that region-based memory management is a good way to go -- even providing safe manual memory management... very nice!</description>
		<content:encoded><![CDATA[<p>Thanks for the info!  </p>
<p>I am actually a big fan of reference counting (use it all the time when doing C++ via Boost&#8217;s / TR1&#8217;s smart pointers).  I think most of the time garbage collection is overkill &#8212; obviously it depends on the situation, but for many of my projects the overhead incurred with a ref-count alloc / dealloc is more desirable than the constant GC tracing step.  </p>
<p>I have seen some papers on real-time garbage collection (ie ensuring that the sweep phase completes or terminates within a guaranteed period of time), which is cool, but doesn&#8217;t alleviate the issue, infact it actually causes a slight additional decrease in performance.</p>
<p>At any rate, I like both GC and ref-counting; it&#8217;s just important to know when to use what.  </p>
<p>I have to say I enjoyed the Bacon et. al paper, thanks for sending the link!  After thinking about it, it makes perfect sense that incrememental GCs basically come down to ref-counting and the more conservative GCs do more tracing, but I never really thought about it until you mentioned that paper.</p>
<p>Also, your comments on region-based memory mangement were great.  The idea of using static analysis to find the earliest deallocation point for a given alloc is very enticing!  I&#8217;m imagining a GC with all the boons of garbage collection (automatic handling of cycles, etc) with performance characteristics similar to ref-counting.  How great would that be!?  And I had no idea about Cyclone before &#8212; a neat little language actually!  I&#8217;m convinced that region-based memory management is a good way to go &#8212; even providing safe manual memory management&#8230; very nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandro</title>
		<link>http://timburrell.net/blog/2008-03-06/garbage-collection-the-joy-and-the-curse/comment-page-1/#comment-144</link>
		<dc:creator>Sandro</dc:creator>
		<pubDate>Fri, 07 Mar 2008 04:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://timburrell.net/research/2008-03-06/garbage-collection-the-joy-and-the-curse/#comment-144</guid>
		<description>I&#039;ve heard some things about NSAutoReleasePool, but I think the originator of many of these ideas is Ada and its Storage_Pool class. A Storage_Pool can allocate memory from any sort of backing store, such as the stack, the global heap, a local heap, etc. Very flexible.

As for GC itself, don&#039;t discount ref-counting! Bacon et al. demonstrated that all GCs are actually a hybrid of tracing and ref-counting [1]. The more incremental the GC, the more ref-counting it does, the higher the throughput, the more tracing it does.

But you are correct that GCs can only conservatively approximate the liveness of data by tracing from the roots. Region-based memory management provides some hope here, as static analyses can be built to find the earliest possible deallocation point for any datum. It&#039;s not  perfect, but it&#039;s quite good. There are even languages that provide type systems to ensure safe manual memory management, ie. that freeing a piece of memory is safe. These languages are also are built on region-based memory management. See Cyclone for instance [2].

[1] http://www.research.ibm.com/people/d/dfb/papers/Bacon04Unified.pdf
[2] http://cyclone.thelanguage.org/</description>
		<content:encoded><![CDATA[<p>I&#8217;ve heard some things about NSAutoReleasePool, but I think the originator of many of these ideas is Ada and its Storage_Pool class. A Storage_Pool can allocate memory from any sort of backing store, such as the stack, the global heap, a local heap, etc. Very flexible.</p>
<p>As for GC itself, don&#8217;t discount ref-counting! Bacon et al. demonstrated that all GCs are actually a hybrid of tracing and ref-counting [1]. The more incremental the GC, the more ref-counting it does, the higher the throughput, the more tracing it does.</p>
<p>But you are correct that GCs can only conservatively approximate the liveness of data by tracing from the roots. Region-based memory management provides some hope here, as static analyses can be built to find the earliest possible deallocation point for any datum. It&#8217;s not  perfect, but it&#8217;s quite good. There are even languages that provide type systems to ensure safe manual memory management, ie. that freeing a piece of memory is safe. These languages are also are built on region-based memory management. See Cyclone for instance [2].</p>
<p>[1] <a href="http://www.research.ibm.com/people/d/dfb/papers/Bacon04Unified.pdf" rel="nofollow">http://www.research.ibm.com/people/d/dfb/papers/Bacon04Unified.pdf</a><br />
[2] <a href="http://cyclone.thelanguage.org/" rel="nofollow">http://cyclone.thelanguage.org/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
