<?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>Kristoffer's tidbits : Interesting</title><link>http://blogs.msdn.com/kristoffer/archive/tags/Interesting/default.aspx</link><description>Tags: Interesting</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>OutOfMemoryException is special</title><link>http://blogs.msdn.com/kristoffer/archive/2009/02/25/outofmemoryexception-is-special.aspx</link><pubDate>Wed, 25 Feb 2009 20:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9444365</guid><dc:creator>Kristoffer</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/kristoffer/comments/9444365.aspx</comments><wfw:commentRss>http://blogs.msdn.com/kristoffer/commentrss.aspx?PostID=9444365</wfw:commentRss><description>&lt;p&gt;Consider the humble OutOfMemoryException and its most common usage. If it is thrown when the system is well and truly out of memory then how would the system allocate enough memory to create a new instance of OutOfMemoryException? Luckily this problem has a simple solution: OutOfMemoryException is allocated up front so it's available when it needs to be thrown.&lt;/p&gt;&lt;p&gt;The .NET runtime does first try to create a new OutOfMemoryException instance but if it fails it will fall back to the preallocated instance so there is always an exception available to be thrown. &lt;/p&gt;&lt;p&gt;Some other exceptions are preallocated: StackOverflowException, ExecutionEngineException, and ThreadAbortException.&lt;br&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9444365" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/kristoffer/archive/tags/Interesting/default.aspx">Interesting</category><category domain="http://blogs.msdn.com/kristoffer/archive/tags/.NET/default.aspx">.NET</category></item></channel></rss>