<?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"
	>
<channel>
	<title>Comments on: More allocator data &#8212; tcmalloc edition</title>
	<atom:link href="http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/</link>
	<description>Ramblings from the mind of Stuart Parmenter</description>
	<pubDate>Sat, 19 Jul 2008 11:13:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Choco</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2840</link>
		<dc:creator>Choco</dc:creator>
		<pubDate>Sat, 09 Feb 2008 16:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2840</guid>
		<description>Keep up the good research work pavlov, you have no idea how much i'm waiting for a memory update. Even with the newest version I'm struggling. While other browsers aren't coping better, I would love to see the day I can keep my mouse-rage in check. :D</description>
		<content:encoded><![CDATA[<p>Keep up the good research work pavlov, you have no idea how much i&#8217;m waiting for a memory update. Even with the newest version I&#8217;m struggling. While other browsers aren&#8217;t coping better, I would love to see the day I can keep my mouse-rage in check. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: some</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2796</link>
		<dc:creator>some</dc:creator>
		<pubDate>Wed, 30 Jan 2008 13:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2796</guid>
		<description>Some more naive questions, I hope you don't mind. 
AIUI, one cannot easily know what code allocated a piece of memory or is responsible for deallocating it. Thus it is difficult to alter allocations. But isn't there a list of allocations used to prevent double allocation? Can't that be used to copy memory from one location to another then change what is pointed to in the list of allocations? Doesn't the responsible code have a pointer to an item in the the list of allocations rather than the object directly such that this would be transparent? If not, what stops it happening this way?

If memory can be moved about, can't unallocatable regions be greatly reduced?</description>
		<content:encoded><![CDATA[<p>Some more naive questions, I hope you don&#8217;t mind.<br />
AIUI, one cannot easily know what code allocated a piece of memory or is responsible for deallocating it. Thus it is difficult to alter allocations. But isn&#8217;t there a list of allocations used to prevent double allocation? Can&#8217;t that be used to copy memory from one location to another then change what is pointed to in the list of allocations? Doesn&#8217;t the responsible code have a pointer to an item in the the list of allocations rather than the object directly such that this would be transparent? If not, what stops it happening this way?</p>
<p>If memory can be moved about, can&#8217;t unallocatable regions be greatly reduced?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DrkShadow</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2757</link>
		<dc:creator>DrkShadow</dc:creator>
		<pubDate>Tue, 22 Jan 2008 07:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-2757</guid>
		<description>Perhaps this is just a show of my naivety, but.. how would a bitmap allocator work?

My thought is: store memory as a bitmap. First, it would have zero size. Then, when you allocate, it'll need to grab some memory, and start a linked list -- one item, pointing to the beginning of the allocated memory. When you deallocate that, the item will stay, and the next allocation, if smaller, will use the start of the space and a second item will be added to the linked list pointing to the byte after the end of the first. Free space is broken up as needed, more space is appended to the end, as needed.

Surely, the linked list would grow, with varying size fragments and fragments that need to be combine. As things are freed, just throw them on the end of the LL -- later, when the system's not doing anything, sort the list. When grabbing a piece of space, do a binary search to find the closest match to the exact size you need. I envision it working like a filesystem, but with appendable data to the end.

... I'm curious, do you think this is too slow? Surely it would result in minimal fragmentation, though still some. As I said, I've never done anything this low-level, so I'm curious about your thoughts :-)

-DrkShadow</description>
		<content:encoded><![CDATA[<p>Perhaps this is just a show of my naivety, but.. how would a bitmap allocator work?</p>
<p>My thought is: store memory as a bitmap. First, it would have zero size. Then, when you allocate, it&#8217;ll need to grab some memory, and start a linked list &#8212; one item, pointing to the beginning of the allocated memory. When you deallocate that, the item will stay, and the next allocation, if smaller, will use the start of the space and a second item will be added to the linked list pointing to the byte after the end of the first. Free space is broken up as needed, more space is appended to the end, as needed.</p>
<p>Surely, the linked list would grow, with varying size fragments and fragments that need to be combine. As things are freed, just throw them on the end of the LL &#8212; later, when the system&#8217;s not doing anything, sort the list. When grabbing a piece of space, do a binary search to find the closest match to the exact size you need. I envision it working like a filesystem, but with appendable data to the end.</p>
<p>&#8230; I&#8217;m curious, do you think this is too slow? Surely it would result in minimal fragmentation, though still some. As I said, I&#8217;ve never done anything this low-level, so I&#8217;m curious about your thoughts <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>-DrkShadow</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pavlov</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1653</link>
		<dc:creator>pavlov</dc:creator>
		<pubDate>Wed, 19 Dec 2007 02:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1653</guid>
		<description>Peter:  We built a tool to log and replay allocations.  We're then able to easily plug in new allocators and see the results.  We're unable to get good multi-threaded allocation performance results, but we can easily get good fragmentation results.  It also lets us test each allocator against the same set of allocations so that we can get comparable results.</description>
		<content:encoded><![CDATA[<p>Peter:  We built a tool to log and replay allocations.  We&#8217;re then able to easily plug in new allocators and see the results.  We&#8217;re unable to get good multi-threaded allocation performance results, but we can easily get good fragmentation results.  It also lets us test each allocator against the same set of allocations so that we can get comparable results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1034</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 07 Dec 2007 17:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1034</guid>
		<description>Could you give a few details on how you hook the allocators into the build, so that they are used for the various different ways to allocate memory that seem to be used in the codebase?</description>
		<content:encoded><![CDATA[<p>Could you give a few details on how you hook the allocators into the build, so that they are used for the various different ways to allocate memory that seem to be used in the codebase?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pd</title>
		<link>http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1009</link>
		<dc:creator>pd</dc:creator>
		<pubDate>Fri, 07 Dec 2007 10:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.pavlov.net/2007/12/06/more-allocator-data-tcmalloc-edition/#comment-1009</guid>
		<description>thanks for your continued diligence in your work

it would be nice if your blog wasn't stuck in the crazy wordpress vertically narrow theme because then we might be able to compare diagrams side by side. Oh well.</description>
		<content:encoded><![CDATA[<p>thanks for your continued diligence in your work</p>
<p>it would be nice if your blog wasn&#8217;t stuck in the crazy wordpress vertically narrow theme because then we might be able to compare diagrams side by side. Oh well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
