<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Artisan Coder &#187; garbage collector</title>
	<atom:link href="http://www.artisancoder.com/tag/garbage-collector/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artisancoder.com</link>
	<description>Software development as a craft</description>
	<lastBuildDate>Thu, 15 Dec 2011 10:57:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding a garbage collector</title>
		<link>http://www.artisancoder.com/2009/05/adding-a-garbage-collector/</link>
		<comments>http://www.artisancoder.com/2009/05/adding-a-garbage-collector/#comments</comments>
		<pubDate>Tue, 05 May 2009 15:00:12 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[scheme]]></category>

		<guid isPermaLink="false">http://www.ventonegro.org/?p=96</guid>
		<description><![CDATA[I guess it is clear by now that I am writing a toy Scheme compiler and virtual machine. Primarily for learning the techniques, I just touch it from time to time. The last addition to the virtual machine was a Cheney-style copy garbage collector. I wanted to implement a very simple algorithm to get a [...]]]></description>
			<content:encoded><![CDATA[<p>I guess it is clear by now that I am writing a toy Scheme compiler and virtual machine. Primarily for learning the techniques, I just touch it from time to time. The last addition to the virtual machine was a <a href="http://en.wikipedia.org/wiki/Cheney%27s_algorithm" title="Cheney's algorithm">Cheney-style</a> copy garbage collector. I wanted to implement a very simple algorithm to get a functioning system quicker. The simplest algorithms I know of are the Cheney one and the <a href="http://portal.acm.org/citation.cfm?id=363554&#038;dl=GUIDE&#038;coll=GUIDE&#038;CFID=34360320&#038;CFTOKEN=66444289" title="An efficient machine-independent procedure for garbage collection in various list structures">Deutsch-Schorr-Waite</a> mark-and-sweep garbage collector. I chose the copying one because I believe generational garbage collection is the way to go for Scheme virtual machines, given that the rate of allocation is very high (allocation in a copy garbage collector is just moving a pointer) and most data objects die young (how many times did you use <tt>reverse</tt> after a loop?).</p>
<p>I was surprised by how easy it was to implement the collector. It is a very simple one (stop-the-world, two semi-spaces etc.) but nevertheless I always thought garbage collectors were somewhat magical, a bunch of elves that worked out of sight to keep your process working perfectly. This is exactly why I am writing such a system, even if it never gets free onto the world it will fulfill its purpose. Of course, if I am satisfied with the result, I will release the beast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artisancoder.com/2009/05/adding-a-garbage-collector/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

