<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Running Valgrind on Python Extensions</title>
	<link>http://blogs.gnome.org/jamesh/2008/03/24/python-valgrind/</link>
	<description>Random stuff</description>
	<pubDate>Sun, 11 May 2008 22:19:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: James Henstridge</title>
		<link>http://blogs.gnome.org/jamesh/2008/03/24/python-valgrind/#comment-639</link>
		<dc:creator>James Henstridge</dc:creator>
		<pubDate>Thu, 27 Mar 2008 05:43:16 +0000</pubDate>
		<guid>http://blogs.gnome.org/jamesh/2008/03/24/python-valgrind/#comment-639</guid>
		<description>Note that even with the suppressions file in effect, Valgrind will miss many leaks if pymalloc is active.  The only difference is that you won't see the uninitialised read warnings that pymalloc generates.

If you allocate a block with pymalloc, it will be carved out of a larger allocation.  If you forget to free that memory, Valgrind doesn't notice because it is only tracking the larger block that pymalloc allocated (which is properly referenced by pymalloc internals).

By bypassing the pymalloc code, each of the allocations is tracked separately by Valgrind and the leak is evident.  An alternative approach to the problem would have been to annotate the pymalloc code with Valgrind's memory pools client API so that it knows what Python thinks is going on inside the larger blocks it allocates.  This is a fair bit more work, and I don't know if it is worth the effort (it'd probably be useful for debugging pymalloc itself though).</description>
		<content:encoded><![CDATA[<p>Note that even with the suppressions file in effect, Valgrind will miss many leaks if pymalloc is active.  The only difference is that you won&#8217;t see the uninitialised read warnings that pymalloc generates.</p>
<p>If you allocate a block with pymalloc, it will be carved out of a larger allocation.  If you forget to free that memory, Valgrind doesn&#8217;t notice because it is only tracking the larger block that pymalloc allocated (which is properly referenced by pymalloc internals).</p>
<p>By bypassing the pymalloc code, each of the allocations is tracked separately by Valgrind and the leak is evident.  An alternative approach to the problem would have been to annotate the pymalloc code with Valgrind&#8217;s memory pools client API so that it knows what Python thinks is going on inside the larger blocks it allocates.  This is a fair bit more work, and I don&#8217;t know if it is worth the effort (it&#8217;d probably be useful for debugging pymalloc itself though).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jelmer Vernooij</title>
		<link>http://blogs.gnome.org/jamesh/2008/03/24/python-valgrind/#comment-638</link>
		<dc:creator>Jelmer Vernooij</dc:creator>
		<pubDate>Wed, 26 Mar 2008 15:47:54 +0000</pubDate>
		<guid>http://blogs.gnome.org/jamesh/2008/03/24/python-valgrind/#comment-638</guid>
		<description>Thanks for this! I can't remember how many times I've run valgrind on python only to find out I forgot to supply the suppressions file.</description>
		<content:encoded><![CDATA[<p>Thanks for this! I can&#8217;t remember how many times I&#8217;ve run valgrind on python only to find out I forgot to supply the suppressions file.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
