<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx</link><description>My favourite author Simon Singh is a wiz at analogies. In his book The big bang he explains concepts like the doppler effect and the theory of relativity using analogies with frogs and trains that makes it not only easy to understand but you will remember</description><dc:language>sv-SE</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#742673</link><pubDate>Wed, 06 Sep 2006 16:25:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:742673</guid><dc:creator>DuncanS</dc:creator><description>Where do you get those &amp;nbsp;memory map pictures?</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#742701</link><pubDate>Wed, 06 Sep 2006 16:47:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:742701</guid><dc:creator>Tess</dc:creator><description>I knew that if I would get one comment on this post, that would be it:) &amp;nbsp;&lt;br&gt;&lt;br&gt;One of my colleagues wrote a sample a long time ago that parses the output from !vadump and displays it in this way.&lt;br&gt;&lt;br&gt;Unfortunately I can't share the tool for different reasons, but the output from !vadump (in windbg) looks something like this if you want to write your own parser...&lt;br&gt;&lt;br&gt;0:000&amp;gt; !vadump&lt;br&gt;BaseAddress: &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000&lt;br&gt;RegionSize: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00010000&lt;br&gt;State: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00010000 &amp;nbsp;MEM_FREE&lt;br&gt;Protect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000001 &amp;nbsp;PAGE_NOACCESS&lt;br&gt;&lt;br&gt;BaseAddress: &amp;nbsp; &amp;nbsp; &amp;nbsp; 00010000&lt;br&gt;RegionSize: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00001000&lt;br&gt;State: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00001000 &amp;nbsp;MEM_COMMIT&lt;br&gt;Protect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000004 &amp;nbsp;PAGE_READWRITE&lt;br&gt;Type: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00020000 &amp;nbsp;MEM_PRIVATE&lt;br&gt;.........&lt;br&gt;&lt;br&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#742793</link><pubDate>Wed, 06 Sep 2006 18:21:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:742793</guid><dc:creator>George</dc:creator><description>Thanks Tess! &amp;nbsp;That was great. &amp;nbsp;But now I'm hungry . . .&lt;br&gt;&lt;br&gt;But seriously: &amp;nbsp;Why does Task Manager show private bytes (and why call it Virtual Memory?) and not give any option to see virtual bytes? &amp;nbsp;From your article I'd think virtual bytes would be a more useful statistic. &amp;nbsp; If there are 10 tables in my restaurant and they are all taken up by 10 different parties of 2 then I've maxed out my available memory - but this VM Size column would show I've only used up 20 seats. &amp;nbsp;If a process has reserved a ton of space I'd like to know about it - even if no one is sitting there at the moment.&lt;br&gt;&lt;br&gt;I expect part of your answer will be to use perfmon. &amp;nbsp;But I *like* taskmanager because I can get to it quick in a crises, see my processes immediately, and even kill one if I have to. &amp;nbsp;So it would be nice if it made a little more sense.&lt;br&gt;&lt;br&gt;OT: &amp;nbsp;All your blog entries are pleasure to read. &amp;nbsp;How about a book?</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#743295</link><pubDate>Thu, 07 Sep 2006 00:35:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:743295</guid><dc:creator>Andy C</dc:creator><description>Best description of memory management ever! :)</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#743591</link><pubDate>Thu, 07 Sep 2006 04:59:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:743591</guid><dc:creator>ACWTeam</dc:creator><description>You'll be happy to know that on Vista private pages is being shown by default instead of working set.</description></item><item><title>Interesting Finds: September 6, 2006</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#743639</link><pubDate>Thu, 07 Sep 2006 05:34:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:743639</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>Link Listing - September 6, 2006</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#743650</link><pubDate>Thu, 07 Sep 2006 05:36:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:743650</guid><dc:creator>Christopher Steen</dc:creator><description> More on Atlas [Via: James Avery ] Smart Client Deployment with ClickOnce - Final Manuscript Complete!...</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#743907</link><pubDate>Thu, 07 Sep 2006 09:46:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:743907</guid><dc:creator>Tess</dc:creator><description>Awesome stuff that vista shows private pages by default, that is really great.&lt;br&gt;&lt;br&gt;George: &amp;nbsp;I hear ya, but it is really not as strange as you might think to call it virtual memory, after all it is committed virtual memory (and to not get endlessly long column names it is listed as just virtual memory). &amp;nbsp; &lt;br&gt;&lt;br&gt;I do agree with you that virtual memory is a ver important counter to look at (yes, unfortunately it is only available in perfmon), but in most memory cases the virtual/private bytes difference is not the problem, so looking at private bytes will give you a very good indication if you have a problem or not. (For example, in most asp.net apps around 1 GB private bytes, the virtual bytes will be ~1,5 GB and it is hard to get a ratio much smaller than that). &amp;nbsp; &amp;nbsp;So for quick stuff, look in task manager for virtual mem, and for real investigations, look in perfmon at both virtual bytes and private bytes. &lt;br&gt;&lt;br&gt;The other thing is that if you look at a memory dump for example, the only thing that will help you recognize who is using the memory is by looking at the committed mem. &amp;nbsp;after all, the mem that is reserved but not committed contains no data, its just uninitialized space or garbage.&lt;br&gt;&lt;br&gt;Having said that, there is ways to track who owns virtual bytes that are not committed. The way to do this is to use a profiler or inject a dll into the process that hooks up to calls to virtualalloc and logs the stack anytime this is called, and then removes them when the space is deallocated. &amp;nbsp;&lt;br&gt;&lt;br&gt;One tool that does this is a tool that we use in support called debugdiag &lt;a rel="nofollow" target="_new" href="http://www.microsoft.com/windowsserver2003/iis/diagnostictools/default.mspx"&gt;http://www.microsoft.com/windowsserver2003/iis/diagnostictools/default.mspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;HTH</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#744763</link><pubDate>Thu, 07 Sep 2006 21:02:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:744763</guid><dc:creator>nativecpp</dc:creator><description>Hi Tess,&lt;br&gt;&lt;br&gt;Very good article. A question on your example of table:&lt;br&gt;&lt;br&gt;From the pic (table), it seems that all tables contains at least one red (committed). &amp;nbsp;How can the following statment be true since you can't split the reserved into two different area:&lt;br&gt;&lt;br&gt;&amp;quot;Even though you could give fit in two 2-seat tables that wouldn't be good since they all want to sit together. &amp;quot;&lt;br&gt;&lt;br&gt;Am I correct or I am missing something ?&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#746004</link><pubDate>Fri, 08 Sep 2006 11:49:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:746004</guid><dc:creator>Tess</dc:creator><description>I am not sure I follow... &lt;br&gt;&lt;br&gt;In the picture above we have had the following parties along with the types of tables they were assigned to&lt;br&gt;&lt;br&gt;party of 1 - 2 seat table&lt;br&gt;party of 4 - 6 seat table &lt;br&gt;party of 3 - 4 seat table&lt;br&gt;party of 2 - 4 seat table&lt;br&gt;party of 4 - 4 seat table&lt;br&gt;party of 1 - 4 seat table&lt;br&gt;&lt;br&gt;It would have been more economical when it comes to space for the last party of 1 to sit at a 2 seat table instead of a 4 seater, but picture it like this...&lt;br&gt;&lt;br&gt;you call in for reservations, hostess: how many are you? you: not sure, i think we'll be 7... &amp;nbsp; so you get a table of 8, and then some of your pals never show up, but now you are already seated at a table of 8. &amp;nbsp; Similarily in the managed world you sometimes over reserve.&lt;br&gt;&lt;br&gt;HTH</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#746277</link><pubDate>Fri, 08 Sep 2006 16:02:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:746277</guid><dc:creator>Petros</dc:creator><description>I am really glad that there are not any real restaurants with GC-hostess. Why? I am a slow eater and I would not like to change seats during my meal.</description></item><item><title>Interesting Finds: September 6, 2006</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#746444</link><pubDate>Fri, 08 Sep 2006 18:26:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:746444</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#750225</link><pubDate>Tue, 12 Sep 2006 09:00:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750225</guid><dc:creator>Padma</dc:creator><description>Great blog. &lt;br&gt;&lt;br&gt;I have some questions on the memory counters - &lt;br&gt;&lt;br&gt;If the difference between the Private bytes and Virtual Bytes is high , does that indicate a problem? In our managed process we see that the private bytes is 250 MB whereas the virtual bytes is 500 MB. Does this mean there is some sort of fragementation?&lt;br&gt;&lt;br&gt;One more question, some of the code pages of the base dlls are shared across the process right, will those also show up in the Committed memory of a process i.e. private bytes? &lt;br&gt;&lt;br&gt;If working set is the pages recently used by the process , why do we sometimes see that Working Set Size (memory usage column in the taskmgr) is greater than the private bytes? &lt;br&gt;&lt;br&gt;thanks , Padma</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#750237</link><pubDate>Tue, 12 Sep 2006 09:23:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750237</guid><dc:creator>Tess</dc:creator><description>Thank you Padma,&lt;br&gt;&lt;br&gt;It is fairly common that there is a difference between virtual and private bytes (up to around 500 MB or so if memory usage is high). &amp;nbsp;For example at the start of the process we will have one small object segment (around 64 MB) and one large object segment (around 16 MB) per processor (for server GC). &amp;nbsp;If these are not filled with data yet, virtual bytes will be a lot higher than private bytes. &amp;nbsp;Similarily dlls dont fit perfectly into the chunk sizes that can be reserved etc. &amp;nbsp; so I would start looking at VM fragmentation if the virtual bytes start increasing independently of private bytes or if for example you start getting out of memory exceptions at 300-400 MB. &amp;nbsp;Then you have a problem of someone reserving a lot more than they need. &amp;nbsp; If your app is purely managed, this is generally not something you have to worrry about since you don't have any custom components that would make unneccessary reservations. &amp;nbsp;One thing that does waste virtual bytes though is having debug=true in web apps.&lt;br&gt;&lt;br&gt;Private bytes are only private bytes so no shared bytes show up.&lt;br&gt;&lt;br&gt;Finally, working set contains shared bytes.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;&lt;br&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#750779</link><pubDate>Tue, 12 Sep 2006 19:36:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750779</guid><dc:creator>nativecpp</dc:creator><description>I must be missing something. As you stated, blue areas are reserved space, red means committed space and white is free space. If I want to make a reservation, GC would need to use the white space to setup a table for me, right ? GC can't use the blue areas since they are reserved and can't fill in the request in some of the empty slot of the blue area ? I guess I misunderstood that you were talking about the blue area.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#751698</link><pubDate>Wed, 13 Sep 2006 09:35:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:751698</guid><dc:creator>Tess</dc:creator><description>Hi NativeCpp:) &lt;br&gt;&lt;br&gt;You are right in that the GC would need to use the white space to set up a table. &amp;nbsp;What happens is that the GC allocates its memory in chunks and committs out of it.&lt;br&gt;&lt;br&gt;For example, at startup of a .net process (server GC) you get one small object heap segment (64 MB) per processor for managed objects. &amp;nbsp; &amp;nbsp;This is reserved and &amp;quot;owned&amp;quot; by the GC. &amp;nbsp; When you do:&lt;br&gt;&lt;br&gt;MyClass s = new MyClass();&lt;br&gt;&lt;br&gt;rather than having to reserve a new slot on some heap, the GC uses it's reserved memory and committs memory out of it. &amp;nbsp;In other words, the GC has a large blue table (reserved), and when you create a new .net object it seats you and marks it red (committ).&lt;br&gt;&lt;br&gt;In the Native C++ world this would work a little differently i believe since virtual memory for C++ objects is not reserved ahead of time, but rather when the object is actually created. &amp;nbsp; &lt;br&gt;&lt;br&gt;The differences between the C++ world and the .net world are so large that they are almost apples and oranges. &amp;nbsp;In the C++ world you manage the memory yourself (taking care of how much you need to allocate/reserve to fit an object, and taking care of when to remove stale objects), in the .NET world the GC does this for you. &amp;nbsp;&lt;br&gt;&lt;br&gt;The problem in the Native world when it comes to memory leaks is often forgetting to free mem, or loosing a pointer to a memory area.&lt;br&gt;&lt;br&gt;In the Managed (.net) world those kind of memory leaks would rarely or ever occurr. &amp;nbsp; Rather, the memory issues that occurr in the managed world are because you hold a reference to an object, keeping it alive a lot longer than you are meaning to. &lt;br&gt;&lt;br&gt;I know I strayed away a little from the original question in the end but hope it helps </description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#751858</link><pubDate>Wed, 13 Sep 2006 13:05:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:751858</guid><dc:creator>padma</dc:creator><description>Thanks for you response. Could you explain me the Server GC and do we get any added benifit using this? </description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#751992</link><pubDate>Wed, 13 Sep 2006 15:53:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:751992</guid><dc:creator>Tess</dc:creator><description>Hi Padma,&lt;br&gt;&lt;br&gt;There are a lot of articles about the GC on MSDN, but one blog that specifically deals with the GC and does so quite well is &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/maoni/archive/2004/09/25/234273.aspx"&gt;http://blogs.msdn.com/maoni/archive/2004/09/25/234273.aspx&lt;/a&gt;&lt;br&gt;Where the different GC flavours are described.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#752256</link><pubDate>Wed, 13 Sep 2006 19:18:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:752256</guid><dc:creator>nativecpp</dc:creator><description>Thanks for the additional clarification. I agreed with you that native C++ and managed are totally different as far as memory is concerned. I also agreed that in managed world we are more concerned about memory rentention than leak. One of my daily activities (weekdays :-) )is to read your blog. &lt;br&gt;&lt;br&gt;&lt;br&gt;As for your previous articles on debugging memory issues using SOS, they are good. But I would love to have some 'real' or 'tough' cases where you need to dig deep to ioslate the problem.&lt;br&gt;&lt;br&gt;&lt;br&gt;Keep up the good work.&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#780958</link><pubDate>Mon, 02 Oct 2006 19:22:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:780958</guid><dc:creator>Zeng</dc:creator><description>Test, great analogy. A question I haven't been able to find answer to is: which memory memoryLimit in machine.config is about?  
- If it's private bytes then is GC aware of this limit to collect memory more often when it's approaching this limit? 
- If it's virtual bytes then is GC aware of this limit to stop itself from over allocating when it's approaching this limit?

thanks</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#784435</link><pubDate>Tue, 03 Oct 2006 10:05:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:784435</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi Zeng,&lt;/p&gt;
&lt;p&gt;The memory limit in machine.config is only for ASP.NET and it is based on the amount of private bytes in the process. &amp;nbsp; The GC as such is not aware of it, but ASP.NET is and will purge the cache when you get close to the limit. &amp;nbsp;Allocations can still happen but once you reach the limit the process will start a recycle. &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#790008</link><pubDate>Wed, 04 Oct 2006 18:54:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:790008</guid><dc:creator>Zeng</dc:creator><description>&lt;P&gt;Tess, thanks for responding. &amp;nbsp;I don't know what "the cache" you referred to is, could you explain here? And if I understand you correctly there is a great chance that the process gets recycled just because GC does collect often enough especially when a big tree of nodes are waiting to be colllected, is that right? Thanks again.&lt;/P&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#792942</link><pubDate>Thu, 05 Oct 2006 09:27:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:792942</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;The cache I am referring to is the ASP.NET cache. &amp;nbsp;The memory limit is only applicable to ASP.NET applications, it does not apply to winforms apps or windows services.&lt;/p&gt;
&lt;p&gt;If it is a winforms app or windows service there is no recycling. &amp;nbsp;If the process &amp;quot;crashes&amp;quot; it won't start up again automatically. &amp;nbsp;If it is an ASP.NET app it will be recycled when it reaches the memory limit. &amp;nbsp;This doesn't have anything to do with how much the GC has to do. &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#922503</link><pubDate>Wed, 01 Nov 2006 17:16:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:922503</guid><dc:creator>Fredrik</dc:creator><description>&lt;p&gt;Great, and entertaining, article!&lt;/p&gt;
&lt;p&gt;I am having a situation where my application has about 70Mb in privates and &amp;gt;300 Mb in virtual bytes, similar to other comments here. &lt;/p&gt;
&lt;p&gt;When looking a bit in windbg I find that MEM_IMAGE (RegionUsageImage) corresponds to almost 200Mb. At a glance this seems to be related to dlls and such that are used by the application. Is this a normal size for these objects?&lt;/p&gt;
&lt;p&gt;Can anything be done to reduce the amount? &lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#928439</link><pubDate>Thu, 02 Nov 2006 10:10:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:928439</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi Fredrik,&lt;/p&gt;
&lt;p&gt;Depends on what you consider normal for your application. &amp;nbsp;If it is 200MB virtual for dlls I wouldn't be too worried but you can run lm to look at the dlls that you have loaded to see if there is a lot that you dont expect. &amp;nbsp;Then you can run !dumpdomain to see the assemblies for each domain and !dumpdynamicassemblies to see the dynamic assemblies. &amp;nbsp;If you have a lot of those you should look into it (see previous posts on dynamic assemblies/XMLSerializer). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also if it is an asp.net app, check that you don't have debug=true in your web.configs. &amp;nbsp;But overall, 70 MB private bytes is pretty small so I don't think you have a problem with dlls based on that. &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1075394</link><pubDate>Tue, 14 Nov 2006 16:44:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1075394</guid><dc:creator>Morgan</dc:creator><description>&lt;p&gt;I am using Vista RC1. It is shown as &amp;quot;Memory(Private Working Set)&amp;quot; in task manager, but the value seems have no relationship to private bytes, virutal bytes or working set in perfmon at all.&lt;/p&gt;
&lt;p&gt;Perhaps it is correct in RTM.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1203371</link><pubDate>Mon, 04 Dec 2006 10:42:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1203371</guid><dc:creator>Tehnoon</dc:creator><description>&lt;P&gt;That is absolutely amazing dude! Excellent excellent stuff!&lt;/P&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1562624</link><pubDate>Wed, 31 Jan 2007 10:47:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1562624</guid><dc:creator>Jaaloor</dc:creator><description>&lt;p&gt;I have a question. We encoutner troubles (you'll see it's normal we do when I'll have finish explaning what we are trying to do ;) with a .Net appliation. We have an application that stores document for users. We upload documents into the http request, to do so we modified the maxRequestLength parameter in the web.config file of the application. The problem is that we want to allow user to upload documents up to 100Mb (yes I know but I am asked for a miracle !). the result is that sometimes we can add such big documents and sometimes we can't. The server as loads of physical memory. &lt;/p&gt;
&lt;p&gt;The thing is that the memory usage for the application never exceed 500Mb or something like that. I fear that when the upload fails it is because it starts to store the request in the memory and at some point don't find any free contiguous memory slot to keep on loading the request. I would expect that it reserves all the memory when the request arrives.&lt;/p&gt;
&lt;p&gt;If anyone has any idea regarding this issue I would be very thankfull !&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1563020</link><pubDate>Wed, 31 Jan 2007 11:09:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1563020</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;You might want to check out&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/johan/archive/2006/11/15/are-you-getting-outofmemoryexceptions-when-uploading-large-files.aspx"&gt;http://blogs.msdn.com/johan/archive/2006/11/15/are-you-getting-outofmemoryexceptions-when-uploading-large-files.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1563079</link><pubDate>Wed, 31 Jan 2007 11:25:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1563079</guid><dc:creator>Jaaloor</dc:creator><description>&lt;p&gt;thanks for your quick answer !&lt;/p&gt;
&lt;p&gt; In fact that is exactly What I try to make understand to my customer but still they first want me to do a miracle ...&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1566285</link><pubDate>Wed, 31 Jan 2007 20:19:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1566285</guid><dc:creator>Jaaloor</dc:creator><description>&lt;p&gt;thanks for your help.&lt;/p&gt;
&lt;p&gt;In fact that I try to say to my customer for the whole week :P one more evidence helped me to bring him to reality :) now we're going towards a realistic solution :P&lt;/p&gt;</description></item><item><title>Administración de la memoria en Windows y .NET</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#1616282</link><pubDate>Wed, 07 Feb 2007 07:16:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1616282</guid><dc:creator>la visión de un ingeniero de campo</dc:creator><description>&lt;p&gt;Veremos de firma simple y did&amp;#225;ctica como funciona la asignaci&amp;#243;n y administraci&amp;#243;n de memoria de Windows y .net.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#2005256</link><pubDate>Sun, 01 Apr 2007 15:03:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2005256</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Tess I think your great (I had a fortune of getting help from you on number of support cases and you are definetly one of the best MS support engineers I worked with).&lt;/p&gt;
&lt;p&gt;Does microsoft (perhaps internally) has a utility that can analyze some of this stuff automaticly? If you have the dump then I am sure alot of these problems can be diagnosed automaticly. Or am I over simplifying here?&lt;/p&gt;
&lt;p&gt;Alex.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#2010095</link><pubDate>Mon, 02 Apr 2007 09:14:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2010095</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;First off, thank you very much:) that makes me blush:)&lt;/p&gt;
&lt;p&gt;We are working on scripts for automating some parts of .net debugging. &amp;nbsp;You may be familiar with a tool for automation of native debugging called debug diagnostics 1.1. &amp;nbsp;In essence we are looking into what we can do as far as writing scripts for that for .net debugging, but there are some parts, especially memory wise that are a bit hard. For example figuring out which objects are interesting to look at based on the !dumpheap -stat output and then determining what roots are interesting since the job is based on a lot of trial and error.&lt;/p&gt;
&lt;p&gt;It is fairly easy to write scripts on your own for debug diag (vbscript files) and a good start is to write one that prints out output from !dumpheap -stat, !dumpheap -min 85000, !eeheap -gc, ~* e !clrstack, !threads, !dumpdomain, !syncblk and ~* kb&lt;/p&gt;
&lt;p&gt;If you just create that &amp;quot;simple&amp;quot; script it takes you a long way into seeing what is going on in most cases, and writing the script is as easy as writing&lt;/p&gt;
&lt;p&gt;Manager.Write g_Debugger.Execute(&amp;quot;!dumpheap -stat&amp;quot;)&lt;/p&gt;
&lt;p&gt;in one of the scripts in the debugdiag scripts folder (of course you have to make sure to load sos first).&lt;/p&gt;
&lt;p&gt;Before we have anything that is usable in a more general sense it might be a while, but as soon as we do, I will post it on the blog. &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#2768146</link><pubDate>Mon, 21 May 2007 17:23:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2768146</guid><dc:creator>Jes</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;Great stuff!&lt;/p&gt;
&lt;p&gt;I am trying to figure out how much RAM our .NET app. is actually using and used your recipe above monitoring with Private and Virtual bytes with PerfMon. This seems to make sense, BUT:&lt;/p&gt;
&lt;p&gt;1) Why is page file constantly growing, when their is sufficient with RAM left? It grows with app. the same size as RAM being used. Has it something to do with Virtual memory always requires disk??? (I am blank :-))) &lt;/p&gt;
&lt;p&gt;2) Why is a high RAM usage &amp;quot;maintained&amp;quot; even after data has been discarded? (first I complete heavy search, then complete less heavy search...dataset is nulled each time) I would expect it to go down immediately. &lt;/p&gt;</description></item><item><title>The hierarchy in flat memory: Heap and Stack</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#3231374</link><pubDate>Mon, 11 Jun 2007 18:59:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3231374</guid><dc:creator>Li Xiong</dc:creator><description>&lt;p&gt;The hierarchy in flat memory: Heap and Stack This section discusses Heap, related heap corruption/memory&lt;/p&gt;
</description></item><item><title>Generational GC (Garbage Collector) - A post-it analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#7905283</link><pubDate>Tue, 26 Feb 2008 18:08:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7905283</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;I was working through the High CPU Lab Review which is basically caused by high CPU in GC. To understand&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#8711416</link><pubDate>Wed, 09 Jul 2008 08:22:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8711416</guid><dc:creator>Amol</dc:creator><description>&lt;p&gt;Tess, that's a wonderful way to explain memory management. I had a query about the following statement though.&lt;/p&gt;
&lt;p&gt;&amp;quot;When you allocate an object (whether it is .net or non-.net) you typically follow a two step process. &amp;nbsp;You reserve the memory and then you commit space inside your reservation.&amp;quot;&lt;/p&gt;
&lt;p&gt;In context of .Net memory management, when is that we reserve the memory and when is it commited. Can you please elaborate?&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#8831977</link><pubDate>Mon, 04 Aug 2008 22:39:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8831977</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;memory on the .net gc heaps are reserved in segments so everytime you fill up a segment and need more space you would reserve a segment which might be for example 16 MB, 32 MB, 64 MB or even larger depending on framework version, GC mode, OS architecture etc. &lt;/p&gt;
&lt;p&gt;Either way, you reserve the 64 MB for example but you wouldn't commit memory inside them until you actually allocate a new .net object. &amp;nbsp;Now if that .net object was just 2k then you would have ~64 MB reserved and 2 k committed... if you allocate another 3k object you would then have 64 mb reserved and 5k committed etc. etc. &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#8865530</link><pubDate>Thu, 14 Aug 2008 10:57:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8865530</guid><dc:creator>Danp129</dc:creator><description>&lt;p&gt;Thanks for writing this. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;For everyone that doesn't like Task Manager, try Process Explorer, it's free and it shows all the memory info you want and has tons of features.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/en-us/sysinternals/0e18b180-9b7a-4c49-8120-c47c5a693683.aspx"&gt;http://technet.microsoft.com/en-us/sysinternals/0e18b180-9b7a-4c49-8120-c47c5a693683.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I recommend the full suite or atleast looking at each app in the suite and choosing what you like.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9130862</link><pubDate>Fri, 21 Nov 2008 01:35:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9130862</guid><dc:creator>Murali</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;Its an excellent article on memory management. Is there any way to identify the memory being consumed by DLL's used. &lt;/p&gt;
&lt;p&gt;For ex:&lt;/p&gt;
&lt;p&gt;A MOSS application has many third party webparts and controls and http handlers. How can we isolate which webpart or which control is taking more memory.&lt;/p&gt;
&lt;p&gt;Because I have observed that application stops serving some of the HTTP handlers until we do a app-pool recycle. Then immediately that handler works and serves the requests and again stops after some time...&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9130896</link><pubDate>Fri, 21 Nov 2008 01:50:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9130896</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;There isnt really a way to record memory allocated by dll (assuming you mean memory allocated by the code in that particular assembly)&lt;/p&gt;
&lt;p&gt;You would have to do a normal memory investigation, check out some of the labs around memory (on the right hand bar) to see how you can do memory investigations... &lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9170897</link><pubDate>Wed, 03 Dec 2008 20:21:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9170897</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;I stumbled upon your article doing a Google search for why Task Manager didn't reflect the correct memory usage. When adding the memory usage for 6 processes it would be up to 8GB and the server only has 3GB! Your article really cleared things up for me by explaining the difference between private bytes &amp;amp; virtual bytes. I'm still not sure how those processes can amount to 8GB but thanks for writing this article!&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9172200</link><pubDate>Thu, 04 Dec 2008 01:56:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9172200</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;while you only have 3 GB of RAM that doesnt mean that the combined memory usage for your processes can't be more. &amp;nbsp;Any memory that doesn't fit in RAM will be swapped out to disk in page files&lt;/p&gt;
</description></item><item><title>Linki do prezentacji o zarządzaniu obiektami</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9222664</link><pubDate>Tue, 16 Dec 2008 01:40:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9222664</guid><dc:creator>.neting in the free world</dc:creator><description>&lt;p&gt;Linki, kt&amp;#243;re posłużyły mi przy tworzeniu prezentacji, z kt&amp;#243;rych czerpałem wiedzę, nakładałem ją na to&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9468900</link><pubDate>Tue, 10 Mar 2009 13:12:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9468900</guid><dc:creator>Hemal</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I have a problem...&lt;/p&gt;
&lt;p&gt;Please help me out.. i m using asp.net 2005 and my application is to uplaod multiple images on the server, but it gets crash down when multiple user tries to uplaod images. the error is like this &lt;/p&gt;
&lt;p&gt;aspnet_wp.exe &amp;nbsp;(PID: 3040) was recycled because memory consumption exceeded the 609 MB (60 percent of available RAM).&lt;/p&gt;
&lt;p&gt;For more information, see Help and Support Center at &lt;a rel="nofollow" target="_new" href="http://go.microsoft.com/fwlink/events.asp"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Means something related to memory, server is having 1GB RAM..&lt;/p&gt;
&lt;p&gt;Please help me out, i m stuck.............&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9468912</link><pubDate>Tue, 10 Mar 2009 13:22:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9468912</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;you might want to read through&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/johan/archive/tags/Upload/default.aspx"&gt;http://blogs.msdn.com/johan/archive/tags/Upload/default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regarding the 60%, this is the default setting for 1.1 in machine.config, &amp;nbsp;you can change it if you dont want it to recycle at 60% of RAM size, but you will probably get out of memory exceptions if your images are very large&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9471979</link><pubDate>Thu, 12 Mar 2009 20:45:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471979</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;I was just reading through this post and marveling at the simplicity and elegance of the explanation, after which I happened to scroll back up to the top. &amp;nbsp;It took me a couple of moments to realize that's probably a picture of the writer up at the top of the page.&lt;/p&gt;
&lt;p&gt;So you have someone walking around with that kind of brain power that also looks like that?! &amp;nbsp;Tess is either a mythical avatar that can't be found in nature or she won the gene pool lottery.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9489946</link><pubDate>Thu, 19 Mar 2009 16:39:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9489946</guid><dc:creator>Amjad</dc:creator><description>&lt;p&gt;Good article, here i want to relate it with my scenario. &lt;/p&gt;
&lt;p&gt;I initialize all the object, which will be needed, in advance and put them in a map and i return the clone of object on demand.&lt;/p&gt;
&lt;p&gt;I want you to shed light on this approach and what to know is there ever a chance of memory leaks in this scenario. Thanks&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9813878</link><pubDate>Thu, 02 Jul 2009 15:03:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9813878</guid><dc:creator>JC</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Really great article.&lt;/p&gt;
&lt;p&gt;I have a query may be you can help. &lt;/p&gt;
&lt;p&gt;In our application we create big arrays of the size &lt;/p&gt;
&lt;p&gt;float[] abc = new float[65000] many such arrays are created. As many as 512 or 1024. We get outofmemory exception frequently. &lt;/p&gt;
&lt;p&gt;The problem is even if we set these arrays to null memory is not released. &lt;/p&gt;
&lt;p&gt;We doubt that GC is not reclaiming the memory. &lt;/p&gt;
&lt;p&gt;We did memory profiling using some tools then the tools shows that the arrays are removed. &lt;/p&gt;
&lt;p&gt;Can you suggest something for this problem.&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9813931</link><pubDate>Thu, 02 Jul 2009 15:30:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9813931</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;JC,&lt;/p&gt;
&lt;p&gt;Because of the size these will end up on the large object heap which is not garbage collected as frequently as small objects. &lt;/p&gt;
&lt;p&gt;Depending on framework version etc. and allocation pattern you may also be causing some significant fragmentation on the large object heap here.&lt;/p&gt;
&lt;p&gt;The GC should collect them if they are ready to be collected the next time a full GC is initiated. &lt;/p&gt;
&lt;p&gt;I am thinking the reason for your OOMs is probably that you allocate a lot of these at the same time (i.e. their lifetimes intersect) and my best advice to you would be to make them slightly smaller so that they dont end up on the large object heap. &amp;nbsp; &amp;nbsp;Monitor the perf counter for LOH to see how much you allocate on the LOH.&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9918301</link><pubDate>Thu, 05 Nov 2009 23:23:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918301</guid><dc:creator>Sandeep</dc:creator><description>&lt;p&gt;Hi Tess&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Great article! But the memory map pictures are not loading on this page...can this be fixed?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9918614</link><pubDate>Fri, 06 Nov 2009 15:05:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918614</guid><dc:creator>Sandeep</dc:creator><description>&lt;p&gt;Hi Tess&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Great article....but the memory map pics are not loading on this page....can this be fixed?&lt;/p&gt;</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9918734</link><pubDate>Fri, 06 Nov 2009 18:44:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918734</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;sandeep, are you talking about pictures? &amp;nbsp;I can see the pics fine, do you get an error of some kind?&lt;/p&gt;
</description></item><item><title>re: .NET Memory usage - A restaurant analogy</title><link>http://blogs.msdn.com/tess/archive/2006/09/06/net-memory-usage-a-restaurant-analogy.aspx#9918824</link><pubDate>Fri, 06 Nov 2009 21:25:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918824</guid><dc:creator>sandeeparora</dc:creator><description>&lt;p&gt;For me, either in IE or Firefox, it just shows a [x] in those places where images should be loaded...I would appreciate if u can mail them to me at this Id : sandeeparora_1704@yahoo.com&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt;Sandeep&lt;/p&gt;</description></item></channel></rss>