<?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>Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx</link><description>Probably.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261755</link><pubDate>Mon, 30 Jan 2012 15:18:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261755</guid><dc:creator>@Zan Lynx</dc:creator><description>&lt;p&gt;Yes. And port third parties DLL &amp;amp; COM components to 64bit. And check&amp;amp;fix all pointer casts. And retest it all. That is - if you can - because those libraries may still be 32bit only, or some needed hardware piece might not have 64bit drivers yet, etc. etc. etc.&lt;/p&gt;
&lt;p&gt;Stop thinking only about your desktop.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261755" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261647</link><pubDate>Mon, 30 Jan 2012 06:31:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261647</guid><dc:creator>Drak</dc:creator><description>&lt;p&gt;@Zan Lynx: Except that companies use computer from specific manufaturers who charge probably about 5 to 10 times as much (because they don&amp;#39;t do upgrades, you need a whole new pc) and you&amp;#39;d have to do (many) more than one computer... For a smaller company that&amp;#39;s a LOT of money.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261647" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261606</link><pubDate>Sun, 29 Jan 2012 22:55:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261606</guid><dc:creator>Zan Lynx</dc:creator><description>&lt;p&gt;Gabe, people who want to map over 2 GB of data (or people who want to run an application that requires it) can these days be expected to pay the $200 for a PC upgrade to a 64-bit system. Yeah. $100 for a 64-bit CPU, 4 GB RAM *and* a motherboard and $100 for a OEM copy of Win-7.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261606" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261574</link><pubDate>Sun, 29 Jan 2012 18:00:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261574</guid><dc:creator>Killer{R}</dc:creator><description>&lt;p&gt;Seems comments on &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/b/oldnewthing/archive/2004/10/26/247918.aspx"&gt;blogs.msdn.com/.../247918.aspx&lt;/a&gt; cant be posted, so I post here a little offtopic: I saw another strange way to detect Win&amp;#39;NT - trying to GetFileAttributes(&amp;quot;???.???&amp;quot;) and checking GetLastError() to be eq ERROR_INVALID_NAME that causes code to assume running under &amp;#39;NT (didnt check what retuned on &amp;#39;9x)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261574" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261393</link><pubDate>Sat, 28 Jan 2012 01:00:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261393</guid><dc:creator>Crescens2k</dc:creator><description>&lt;p&gt;@Myria&lt;/p&gt;
&lt;p&gt;From the CreateFileMapping documentation found at &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa366537(v=vs.85).aspx"&gt;msdn.microsoft.com/.../aa366537(v=vs.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;With one important exception, file views derived from any file mapping object that is backed by the same file are coherent or identical at a specific time. Coherency is guaranteed for views within a process and for views that are mapped by different processes. &lt;/p&gt;
&lt;p&gt;The exception is related to remote files. Although CreateFileMapping works with remote files, it does not keep them coherent. For example, if two computers both map a file as writable, and both change the same page, each computer only sees its own writes to the page. When the data gets updated on the disk, it is not merged.&lt;/p&gt;
&lt;p&gt;A mapped file and a file that is accessed by using the input and output (I/O) functions (ReadFile and WriteFile) are not necessarily coherent.&amp;quot;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261393" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261365</link><pubDate>Fri, 27 Jan 2012 23:26:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261365</guid><dc:creator>Myria</dc:creator><description>&lt;p&gt;I have a program that forks off a second process. &amp;nbsp;The first process creates a pagefile-backed section with CreateFileMapping, then DuplicateHandles it into the child process. &amp;nbsp;Both processes then map the section into their address spaces with MapViewOfFileEx. &amp;nbsp;Can these two programs, using the same underlying section object, rely upon the mapping being shared with memory writes instantly available to the other side?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261365" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261328</link><pubDate>Fri, 27 Jan 2012 21:44:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261328</guid><dc:creator>Gabe</dc:creator><description>&lt;p&gt;Why do so many people assume that everybody can just instantly switch to 64-bit? There are plenty of people with only 32-bit hardware, running 32-bit OSes on 64-bit hardware, using 32-bit only libraries, working with a codebase that isn&amp;#39;t portable to 64-bit, or even on an architecture that doesn&amp;#39;t have a 64-bit version (like ARM).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261328" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261323</link><pubDate>Fri, 27 Jan 2012 21:36:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261323</guid><dc:creator>Crescens2k</dc:creator><description>&lt;p&gt;@Pramod&lt;/p&gt;
&lt;p&gt;Maybe not 64bit, but could be the case for 32bit.&lt;/p&gt;
&lt;p&gt;You must remember that these posts are queued for quite some time, and can be in response to things that happened even longer before that.&lt;/p&gt;
&lt;p&gt;So think about you being stuck back in 2004/2005 and your application is going to run on a 32bit system. So if you were mapping in multiple database files, would you want to let so much address space be used up for the same database?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261323" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261309</link><pubDate>Fri, 27 Jan 2012 20:39:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261309</guid><dc:creator>Pramod</dc:creator><description>&lt;p&gt;What&amp;#39;s the real problem here? Is anybody actually running out of bytes in a 64-bit address space? Seems unbelievable to me. &lt;/p&gt;
&lt;p&gt;That said, I&amp;#39;d be careful about virtual address aliasing. I may have worked on some processors which might have shipped with performance bugs when using aliased cache lines.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261309" width="1" height="1"&gt;</description></item><item><title>re: Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx#10261285</link><pubDate>Fri, 27 Jan 2012 18:44:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261285</guid><dc:creator>Joshua</dc:creator><description>&lt;p&gt;@Crescens2k: Well that would explain it then. I don&amp;#39;t have any 9x other than 95 anymore but I never checked 98SE.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261285" width="1" height="1"&gt;</description></item></channel></rss>