<?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>When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx</link><description>When I say memory I mean physical memory. Let’s assume that you have enough virtual memory space. When the physical memory gets low you may start getting OOMs or start paging. You can experiment and see how you can avoid getting into the low memory situation</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#620774</link><pubDate>Wed, 07 Jun 2006 16:57:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:620774</guid><dc:creator>Blake Niemyjski</dc:creator><description>Keep up the good work. I love reading your blog :)</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#627073</link><pubDate>Mon, 12 Jun 2006 04:29:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:627073</guid><dc:creator>Paul Ming</dc:creator><description>Assuming there's plenty of virtual memory address space free, how would low available physical memory cause OutOfMemoryExceptions?</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#632951</link><pubDate>Fri, 16 Jun 2006 01:02:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:632951</guid><dc:creator>maoni</dc:creator><description>If you don't have enough physical storage we will fail when we need to commit memory. We attemp a GC at this point and if afterwards there's still not enough physical storage to commit we will throw an OOM.&lt;br&gt;&lt;br&gt;When you have a page file, physial storage includes both physical memory and the page file.</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#663798</link><pubDate>Thu, 13 Jul 2006 00:56:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:663798</guid><dc:creator>Anil</dc:creator><description>What if you have lots of physical memory but not enough virtual address space? How would you detect this situation and resolve it?</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#673177</link><pubDate>Fri, 21 Jul 2006 00:44:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:673177</guid><dc:creator>maoni</dc:creator><description>Anil, how we detect:&lt;br&gt;&lt;br&gt;Not enough virtual address --&amp;gt; failiure to reserve a new heap segment. &lt;br&gt;Not enough physical storage --&amp;gt; failiure to commit&lt;br&gt;&lt;br&gt;how we resolve:&lt;br&gt;&lt;br&gt;Basically we will try to do with what we have. After that if we are still short on space (to reserve or commit) we will trigger a GC see if we can get enough memory back. If not we will OOM.</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#732711</link><pubDate>Thu, 31 Aug 2006 05:01:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:732711</guid><dc:creator>Ramakrishna</dc:creator><description>Is there any side affect of calling &lt;br&gt;SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1). When i use this i see that the Mem Usage in the Task Manager drops significantly for the process.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#732818</link><pubDate>Thu, 31 Aug 2006 06:51:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:732818</guid><dc:creator>maoni</dc:creator><description>Ramakrishna, SetProcessWorkingSetSize trims the working set and &amp;quot;Mem Usage&amp;quot; in TaskMgr indicates the process's working set so that's why you see it drop a lot.&lt;br&gt;&lt;br&gt;This means you are swaping the process out of the physical memory. When you need to use memory you'll have to swap it back in. </description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#734076</link><pubDate>Thu, 31 Aug 2006 23:00:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:734076</guid><dc:creator>Mark E.</dc:creator><description>&amp;gt;&amp;gt;&lt;br&gt;[...]if you really want to limit the memory for a process, you even have a way to do it via Win32 APIs. You can create a job object via the CreateJobObject call that you associate with your process, and specify the amount of memory the process is allowed to use (or if you have only one process associated you can set the memory limit for the job) via SetInformationJobObject.&lt;br&gt;&amp;lt;&amp;lt;&lt;br&gt;&lt;br&gt;Can you provide an example or a link to an example? My co-worker and I have been working on this problem for some time now and are unable to get a working sample.&lt;br&gt;&lt;br&gt;The situation:&lt;br&gt;Citrix server with our customer requesting/demanding that the application remain within a specified memory boundary. The program being replaced is not .NET and manages the RAM footprint very nicely. BTW, security of the user session doesn't allow calls to SetProcessWorkingSetSize if that helps.&lt;br&gt;&lt;br&gt;-Mark E.</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#750983</link><pubDate>Tue, 12 Sep 2006 22:25:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750983</guid><dc:creator>Mark E.</dc:creator><description>I did end up finding a solution to the continual memory growth problem that we were experiencing. &lt;br&gt;&lt;br&gt;I just wanted to share the solution with other readers who might come across this in the future.&lt;br&gt;&lt;br&gt;See my comments on this post (from &amp;quot;Mark E.&amp;quot;):&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/maoni/archive/2006/08/18/706726.aspx"&gt;http://blogs.msdn.com/maoni/archive/2006/08/18/706726.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;-Mark E.</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#781599</link><pubDate>Mon, 02 Oct 2006 22:40:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:781599</guid><dc:creator>chuck</dc:creator><description>&lt;p&gt;We are using the sql report viewer with local reports.&lt;/p&gt;
&lt;p&gt;After every report export to pdf memory goes up by 200 meg (for hours). After 4-5 exports IIS crashes and the memory comes back. &amp;nbsp;MS said this is normal (SRX060712604389) it's the way GC works. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Shouldn't GC be called automatically if you have half a gig or more of memory that isn't being used for hours?&lt;/p&gt;
</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#781622</link><pubDate>Mon, 02 Oct 2006 22:47:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:781622</guid><dc:creator>maoni</dc:creator><description>&lt;p&gt;chuck: did they explain to you why &amp;quot;this is normal&amp;quot;? The info you gave is not detailed enough for me to give any feedback.&lt;/p&gt;
</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#781956</link><pubDate>Tue, 03 Oct 2006 00:48:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:781956</guid><dc:creator>maoni</dc:creator><description>&lt;p&gt;chuck, I checked with my PSS contact on your case. It seems that your issue was related to RS, not GC. Our PSS engineer who worked with you didn't hear back from you after he explained this to you. If you have additional questions, please do not hesitate to contact him again and let him know. Thanks.&lt;/p&gt;
</description></item><item><title>Fun with the .NET GC, Paging, Generations and Write Barriers</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#1636075</link><pubDate>Fri, 09 Feb 2007 20:15:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1636075</guid><dc:creator>All Your Base Are Belong To Us</dc:creator><description>&lt;p&gt;There are plenty of resources on the .NET garbage collector, ranging from fairly basic overviews that&lt;/p&gt;
</description></item><item><title>Top 20 .NET Garbage Collection (GC) Articles</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#3453185</link><pubDate>Fri, 22 Jun 2007 08:36:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3453185</guid><dc:creator>roy ashbrook</dc:creator><description>&lt;p&gt;Ah. Garbage Collection... how I love and hate thee. =P I think one sad thing about programming in .net&lt;/p&gt;
</description></item><item><title>re: When memory is running low…</title><link>http://blogs.msdn.com/maoni/archive/2006/06/06/when-memory-is-running-low.aspx#9427616</link><pubDate>Tue, 17 Feb 2009 17:25:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9427616</guid><dc:creator>nancy brownsville</dc:creator><description>&lt;p&gt;what makes memory runns out,i dont know much about this kind of thing i need help&lt;/p&gt;
</description></item></channel></rss>