<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: [.NET Internals 08] What about Large Object Heap (LOH)?	</title>
	<atom:link href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/</link>
	<description>Pragmatic full stack software development</description>
	<lastBuildDate>Sat, 17 Nov 2018 12:06:01 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Konrad Kokosa		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-157</link>

		<dc:creator><![CDATA[Konrad Kokosa]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 07:15:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-157</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-155&quot;&gt;Dawid Sibiński&lt;/a&gt;.

Right, such statement could be much more accurate in 2011 :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-155">Dawid Sibiński</a>.</p>
<p>Right, such statement could be much more accurate in 2011 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Konrad Kokosa		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-158</link>

		<dc:creator><![CDATA[Konrad Kokosa]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 03:14:20 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-158</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-155&quot;&gt;Dawid Sibiński&lt;/a&gt;.

Right, such statement could be much more accurate in 2011 :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-155">Dawid Sibiński</a>.</p>
<p>Right, such statement could be much more accurate in 2011 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dawid Sibiński		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-156</link>

		<dc:creator><![CDATA[Dawid Sibiński]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 21:32:13 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-156</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-153&quot;&gt;Konrad Kokosa&lt;/a&gt;.

Thanks guys.
@adamfurmanek:disqus indeed, I should rather use 85,000 bytes terminology. Sometimes forgetting we&#039;re on Windows and with Microsoft, so using 1KB I should assume 1024 bytes ;)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-153">Konrad Kokosa</a>.</p>
<p>Thanks guys.<br />
@adamfurmanek:disqus indeed, I should rather use 85,000 bytes terminology. Sometimes forgetting we&#8217;re on Windows and with Microsoft, so using 1KB I should assume 1024 bytes 😉</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dawid Sibiński		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-155</link>

		<dc:creator><![CDATA[Dawid Sibiński]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 21:07:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-155</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-154&quot;&gt;Konrad Kokosa&lt;/a&gt;.

Thanks Konrad.
Hmm, you&#039;re probably right, it was not very clear for me. I&#039;ve just verified in &#039;Under the Hood of .NET Memory Management&quot; which says &quot;In fact, for performance reasons, .NET preferentially allocates large objects at the end of
the heap&quot;. That&#039;s probably because it&#039;s quite on old book (2011), while LOH handling was optimized a lot in .NET 4.5.

However on the schemas presented on https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap it seems as you said, so:
1. Try to allocate in the free memory blocks
2. If no free memory chunks large enough found - try to allocate at the end of the heap (and request more segments from the OS if necessary)
3. If point 2. didn&#039;t work - perform a full GC hoping that some more objects get reclaimed.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-154">Konrad Kokosa</a>.</p>
<p>Thanks Konrad.<br />
Hmm, you&#8217;re probably right, it was not very clear for me. I&#8217;ve just verified in &#8216;Under the Hood of .NET Memory Management&#8221; which says &#8220;In fact, for performance reasons, .NET preferentially allocates large objects at the end of<br />
the heap&#8221;. That&#8217;s probably because it&#8217;s quite on old book (2011), while LOH handling was optimized a lot in .NET 4.5.</p>
<p>However on the schemas presented on <a href="https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap" rel="nofollow ugc">https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap</a> it seems as you said, so:<br />
1. Try to allocate in the free memory blocks<br />
2. If no free memory chunks large enough found &#8211; try to allocate at the end of the heap (and request more segments from the OS if necessary)<br />
3. If point 2. didn&#8217;t work &#8211; perform a full GC hoping that some more objects get reclaimed.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Konrad Kokosa		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-154</link>

		<dc:creator><![CDATA[Konrad Kokosa]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 19:12:19 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-154</guid>

					<description><![CDATA[And again nice article! Just single note from my side:

&quot;garbage collector prefers to allocate new large objects at the end of the heap&quot;

This is generally quite misleading - in fact GC always prefers to make use of fragmentation first.]]></description>
			<content:encoded><![CDATA[<p>And again nice article! Just single note from my side:</p>
<p>&#8220;garbage collector prefers to allocate new large objects at the end of the heap&#8221;</p>
<p>This is generally quite misleading &#8211; in fact GC always prefers to make use of fragmentation first.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Konrad Kokosa		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-153</link>

		<dc:creator><![CDATA[Konrad Kokosa]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 19:09:20 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-153</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-152&quot;&gt;Adam Furmanek&lt;/a&gt;.

Btw such arrays of doubles are allocated in LOH only in case of 32-bit framework, which is a small detail probably worth calling out.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-152">Adam Furmanek</a>.</p>
<p>Btw such arrays of doubles are allocated in LOH only in case of 32-bit framework, which is a small detail probably worth calling out.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adam Furmanek		</title>
		<link>https://www.codejourney.net/net-internals-08-what-about-large-object-heap-loh/#comment-152</link>

		<dc:creator><![CDATA[Adam Furmanek]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 17:30:21 +0000</pubDate>
		<guid isPermaLink="false">https://www.dsibinski.pl/?p=2812#comment-152</guid>

					<description><![CDATA[&#062; objects of size greater than 85 kilobytes are placed on LOH
It&#039;s not 85 kilobytes (= 85 * 1024 bytes), it is 85 thousand bytes (= 85 * 1000 bytes). See this https://dotnetfiddle.net/Sw4TuJ

&#062; not 10626 elements as could be expected
Just nitpicking :) I think it should be 10624, this gives 10624 * 8 doubles + 4 for sync block + 4 for type handle + 4 for size = 85004.]]></description>
			<content:encoded><![CDATA[<p>&gt; objects of size greater than 85 kilobytes are placed on LOH<br />
It&#8217;s not 85 kilobytes (= 85 * 1024 bytes), it is 85 thousand bytes (= 85 * 1000 bytes). See this <a href="https://dotnetfiddle.net/Sw4TuJ" rel="nofollow ugc">https://dotnetfiddle.net/Sw4TuJ</a></p>
<p>&gt; not 10626 elements as could be expected<br />
Just nitpicking 🙂 I think it should be 10624, this gives 10624 * 8 doubles + 4 for sync block + 4 for type handle + 4 for size = 85004.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
