<?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>Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx</link><description>Just because the virtual address space is 3GB doesn't mean that you can
map one giant 3GB block of memory.
The standard holes in the virtual address space are still there:
64K at the bottom, and 64K near the 2GB boundary . Moreover, the system DLLs continue</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215107</link><pubDate>Mon, 16 Aug 2004 14:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215107</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;Third, the system really needs certain key DLLs to be loaded at the same address in all processes. For example, the syscall trap must reside at a fixed location so that the kernel-mode trap handler will recognize it as a valid syscall trap &amp;quot;&lt;br&gt;&lt;br&gt;The handler can't look for two addresses instead of one?&lt;br&gt;&lt;br&gt;It's still not clear to me why the top bad pointer catching hole can't be removed entirely (the reason for it to exist no longer makes so much sense with a 3 GiB address space), and why system .dlls can't be loaded at just below 3 GiB.  Indeed, it's not clear why they can't be loaded at just below 3 GiB even for 2 GiB applications.&lt;br&gt;&lt;br&gt;Of course, it's still not going to stop boneheaded third-party hook libraries loading at somewhere idiotic like 256 or 512 MiB thereby leaving the address space horribly fragmented before we've even begun.&lt;br&gt;&lt;br&gt;And even Windows itself is pretty crappy in this regard, as various system libraries will load as low as about 1.5 GiB.&lt;br&gt;&lt;br&gt;It's a wonder the CLR manages to load as often as it does.&lt;br&gt;</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215121</link><pubDate>Mon, 16 Aug 2004 15:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215121</guid><dc:creator>Raymond Chen</dc:creator><description>You seriously do not want to slow down the syscall code path. That is critical to system performance. I'll try to remember tell a story about syscall performance later.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215172</link><pubDate>Mon, 16 Aug 2004 16:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215172</guid><dc:creator>DrPizza</dc:creator><description>Two address checks (if two checks are even necessary; you could just have two interrupts; one for libraries loaded just below 2 GiB, one for libraries loaded just below 3 GiB, which would have no performance cost and a *tiny* (fraction of a page) memory cost) would really be that damaging to performance?&lt;br&gt;</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215176</link><pubDate>Mon, 16 Aug 2004 17:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215176</guid><dc:creator>Raymond Chen</dc:creator><description>As Skywing noted, there's more than one 'fixed address' in ntdll.&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://weblogs.asp.net/oldnewthing/archive/2004/08/12/213468.aspx#215160"&gt;http://weblogs.asp.net/oldnewthing/archive/2004/08/12/213468.aspx#215160&lt;/a&gt;&lt;br&gt;&lt;br&gt;See remarks there for other considerations (like the enormouse cost of rebasing).</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215189</link><pubDate>Mon, 16 Aug 2004 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215189</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;(like the enormouse cost of rebasing). &amp;quot;&lt;br&gt;&lt;br&gt;Um, as pathological examples such as &lt;a target="_new" href="http://msdn.microsoft.com/msdnmag/issues/0500/hood/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/0500/hood/default.aspx&lt;/a&gt; show, the actual cost of rebasing is very small (about a 12% load cost in something that's approaching a worst-case scenario; 1000 imported functions is a lot); there is an additional memory cost, but that could be mitigated in many circumstances without much additional code (it seems to me would be simple enough to have one memory footprint *per base address* and to prefer to use pre-existing rebased base addresses if they exist).&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215200</link><pubDate>Mon, 16 Aug 2004 17:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215200</guid><dc:creator>Raymond Chen</dc:creator><description>(Notice that Pietrek didn't measure the memory cost, only the speed cost.)&lt;br&gt;&lt;br&gt;Sure all of these things could have been done, I'm not denying that. But you have to balance the benefit (to a comparatively limited set of programs) against the cost (lots of changes in the kernel that affect all programs) and the schedule (time spent doing this is time not spent doing something else). Somebody did that balance and decided that in the grand scheme of things, the benefit did not outweigh the cost.&lt;br&gt;&lt;br&gt;(Indeed, the Win95 team implemented rebasing in an entirely different way which is focused on minimizing memory requirements. Different teams have different design priorities.)</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215254</link><pubDate>Mon, 16 Aug 2004 18:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215254</guid><dc:creator>Eric Wilson</dc:creator><description>As an idea for a article, could you lay out the various &amp;quot;special&amp;quot; virtual addresses in a win32 application?  I for one had no idea what the &amp;quot;64K gap around 2GB&amp;quot; was for.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215268</link><pubDate>Mon, 16 Aug 2004 19:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215268</guid><dc:creator>Skywing</dc:creator><description>Raymond covered this issue here &amp;lt;&lt;a target="_new" href="http://weblogs.asp.net/oldnewthing/archive/2003/10/08/55239.aspx&amp;gt;"&gt;http://weblogs.asp.net/oldnewthing/archive/2003/10/08/55239.aspx&amp;gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;It's a workaround for an artifact of how you build a 32-bit address on Alpha processors.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215553</link><pubDate>Tue, 17 Aug 2004 07:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215553</guid><dc:creator>foo</dc:creator><description>Will these /3GB posts never end?</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215591</link><pubDate>Tue, 17 Aug 2004 09:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215591</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;Sure all of these things could have been done, I'm not denying that. But you have to balance the benefit (to a comparatively limited set of programs) against the cost (lots of changes in the kernel that affect all programs) and the schedule (time spent doing this is time not spent doing something else). Somebody did that balance and decided that in the grand scheme of things, the benefit did not outweigh the cost. &amp;quot;&lt;br&gt;But the thing is, the benefit could apply to *any* program, because *any* program could have to rebase some libraries.  Even if the developer has picked different offsets for all his .dlls, because in practice he has no guarantee that they'll load at their preferred address.&lt;br&gt;</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215904</link><pubDate>Tue, 17 Aug 2004 18:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215904</guid><dc:creator>Mack</dc:creator><description>Skywing: &amp;quot; Raymond covered this issue here &lt;a target="_new" href="http://weblogs.asp.net/oldnewthing/archive/2003/10/08/55239.aspx"&gt;http://weblogs.asp.net/oldnewthing/archive/2003/10/08/55239.aspx&lt;/a&gt; &amp;quot;&lt;br&gt;&lt;br&gt;That article explains why even on the x86, address space allocation granularity is 64K (to keep Windows' behaviour consistent among processor architectures; specifically the Alpha AXP). It also explains why on the Alpha AXP, there's a 64 kb &amp;quot;hole&amp;quot; in the address space near 2^32 boundary.&lt;br&gt;&lt;br&gt;It does *not* explain why the same hole should exist on x86 processors, or -- even more astonishing -- on 64-bit x86 processors.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215912</link><pubDate>Tue, 17 Aug 2004 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215912</guid><dc:creator>Mack</dc:creator><description>2^31 bit boundary, sorry.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215917</link><pubDate>Tue, 17 Aug 2004 18:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215917</guid><dc:creator>Mack</dc:creator><description>Or *byte*, for that matter. I urgently need some sleep. Or caffeine. Preferably both...</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#215955</link><pubDate>Tue, 17 Aug 2004 18:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:215955</guid><dc:creator>Skywing</dc:creator><description>It's probably there to encourage more uniform behavior across all platforms, which theoretically means more portable applications.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#216708</link><pubDate>Wed, 18 Aug 2004 20:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:216708</guid><dc:creator>Ben Hutchings</dc:creator><description>Skywing wrote: &amp;quot;It's probably there to encourage more uniform behavior across all platforms, which theoretically means more portable applications.&amp;quot;&lt;br&gt;&lt;br&gt;It seems to me that it is likely to do the exact opposite. By making undocumented behaviour consistent across all architectures, even where there are benefits to tuning it for each architecture, MS fails to challenge the assumptions of programmers who &amp;quot;know too much&amp;quot; about the underlying system. If things like this were to vary between architectures then programmers would learn sooner not to write unportable code. Er, I think.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#216714</link><pubDate>Wed, 18 Aug 2004 21:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:216714</guid><dc:creator>Raymond Chen</dc:creator><description>If they varied between architectures then programmers would still write unportable code, because - let's be honest - raise your hand if you test your programs on Alpha AXP or ia64 before you release it...&lt;br&gt;&lt;br&gt;By keeping the quirks the same, you increase the changes that a program written for one architecture will run on another architecture &amp;quot;entirely by accident&amp;quot;.</description></item><item><title>re: Myth: The /3GB switch lets me map one giant 3GB block of memory</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#217010</link><pubDate>Thu, 19 Aug 2004 09:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:217010</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;By keeping the quirks the same, you increase the changes that a program written for one architecture will run on another architecture &amp;quot;entirely by accident&amp;quot;. &amp;quot;&lt;br&gt;&lt;br&gt;But you also increase the chances that a program which doesn't *actually* work properly on another platform (say, because it truncates a pointer or something like that) *appears* to work *most* of the time.&lt;br&gt;&lt;br&gt;That's not a good thing.&lt;br&gt;</description></item><item><title>The story of the 3GB server switch</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#217845</link><pubDate>Fri, 20 Aug 2004 20:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:217845</guid><dc:creator>Savage Nomads</dc:creator><description> &amp;amp;nbsp; As Evan&amp;amp;nbsp;already mentioned on his blog, Raymond Chen has a great series on /3GB switch on his blog. What is really cool is that Raymond takes on some myths about the /3GB switch and&amp;amp;nbsp; the fact that he...</description></item><item><title>Maximum Size of a SOAP Message</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#583797</link><pubDate>Wed, 26 Apr 2006 07:23:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:583797</guid><dc:creator>Nicholas Allen's Indigo Blog</dc:creator><description>From time to time I wonder who comes to read this blog and why, but those kinds of questions are very...</description></item><item><title>Maximum Size of a SOAP Message</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/08/16/215089.aspx#836993</link><pubDate>Wed, 18 Oct 2006 02:31:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:836993</guid><dc:creator>Nicholas Allen's Indigo Blog</dc:creator><description>&lt;p&gt;From time to time I wonder who comes to read this blog and why, but those kinds of questions are very&lt;/p&gt;
</description></item></channel></rss>