<?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: visual studio 2008 memory leak/memory issue on x86 - the operation could not be completed.Not enough storage is available to complete this operation</title>
	<atom:link href="http://debuggingblog.com/wp/2009/07/03/visual-studio-2008-memory-leakmemory-issue-on-x86-the-operation-could-not-be-completednot-enough-storage-is-available-to-complete-this-operation/feed/" rel="self" type="application/rss+xml" />
	<link>http://debuggingblog.com/wp/2009/07/03/visual-studio-2008-memory-leakmemory-issue-on-x86-the-operation-could-not-be-completednot-enough-storage-is-available-to-complete-this-operation/</link>
	<description></description>
	<pubDate>Fri, 12 Mar 2010 00:28:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: prashant</title>
		<link>http://debuggingblog.com/wp/2009/07/03/visual-studio-2008-memory-leakmemory-issue-on-x86-the-operation-could-not-be-completednot-enough-storage-is-available-to-complete-this-operation/#comment-1603</link>
		<dc:creator>prashant</dc:creator>
		<pubDate>Thu, 01 Oct 2009 09:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://debuggingblog.com/wp/?p=388#comment-1603</guid>
		<description>&lt;a href="#comment-1559" rel="nofollow"&gt;@Nick Galler&lt;/a&gt;, First, let me explain you "mt". MT stands for method table. MethodTable is a data structure which represents the class and the interface in memory. MethodTable data structure gets created from assembly's metadata when an assembly is loaded during appdomain creation. Each object allocated on managed heap has additional 4 bytes of overhead for TypeHandle. TypeHandle is nothing but a pointer to a MethodTable data structure in a managed object. For example, let’s say we have a class called Foo as shown below

class Foo{}
Foo obj = new Foo(); 

Before an instance of Foo is created, CLR will look up the loaded type, in this case it will look for the type Foo to see, if it exists. If Foo type is not loaded, it will load the type and get the MethodTable address. It will create the object instance and populates the object instance with the TypeHandle value which will be the pointer to the just obtained MethodTable data structure. The JIT complier generated code uses TypeHandle to locate the MethodTable for method dispatching since the MethodSlotTable within MethodTable has the information on type's method. 

Alright so enough about MT, when you want to dump all the objects of a type on managed heap, you get the method table address by executing "dumpheap -type " . once you have the method table address, you can execute 'dumpheap -mt " to get the objects on managed heap</description>
		<content:encoded><![CDATA[<p><a href="#comment-1559" rel="nofollow">@Nick Galler</a>, First, let me explain you &#8220;mt&#8221;. MT stands for method table. MethodTable is a data structure which represents the class and the interface in memory. MethodTable data structure gets created from assembly&#8217;s metadata when an assembly is loaded during appdomain creation. Each object allocated on managed heap has additional 4 bytes of overhead for TypeHandle. TypeHandle is nothing but a pointer to a MethodTable data structure in a managed object. For example, let’s say we have a class called Foo as shown below</p>
<p>class Foo{}<br />
Foo obj = new Foo(); </p>
<p>Before an instance of Foo is created, CLR will look up the loaded type, in this case it will look for the type Foo to see, if it exists. If Foo type is not loaded, it will load the type and get the MethodTable address. It will create the object instance and populates the object instance with the TypeHandle value which will be the pointer to the just obtained MethodTable data structure. The JIT complier generated code uses TypeHandle to locate the MethodTable for method dispatching since the MethodSlotTable within MethodTable has the information on type&#8217;s method. </p>
<p>Alright so enough about MT, when you want to dump all the objects of a type on managed heap, you get the method table address by executing &#8220;dumpheap -type &#8221; . once you have the method table address, you can execute &#8216;dumpheap -mt &#8221; to get the objects on managed heap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Galler</title>
		<link>http://debuggingblog.com/wp/2009/07/03/visual-studio-2008-memory-leakmemory-issue-on-x86-the-operation-could-not-be-completednot-enough-storage-is-available-to-complete-this-operation/#comment-1559</link>
		<dc:creator>Nick Galler</dc:creator>
		<pubDate>Wed, 23 Sep 2009 23:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://debuggingblog.com/wp/?p=388#comment-1559</guid>
		<description>Hi, I am so sorry as this is not directly related to the XML issue, but I am trying to troubleshoot memory leaks as well - I was wondering how you came up with the "0c9d4134" in this line:
0:000&#62; !dumpheap -mt 0c9d4134 

Thanks</description>
		<content:encoded><![CDATA[<p>Hi, I am so sorry as this is not directly related to the XML issue, but I am trying to troubleshoot memory leaks as well - I was wondering how you came up with the &#8220;0c9d4134&#8243; in this line:<br />
0:000&gt; !dumpheap -mt 0c9d4134 </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
