<?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>Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx</link><description>Posted by: Sue Loh This article explains how memory access and memory passing is implemented in Windows CE 6 as well as previous versions of the OS. My intention is to explain the significant differences in CE6 by contrasting it against earlier OS versions.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CE6 Drivers: What you need to know</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1051620</link><pubDate>Fri, 10 Nov 2006 07:57:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1051620</guid><dc:creator>Windows CE Base Team Blog</dc:creator><description>&lt;p&gt;Posted by: Sue Loh One of the biggest concerns people have about the new CE6 release is backward compatibility.&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1053483</link><pubDate>Fri, 10 Nov 2006 10:28:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1053483</guid><dc:creator>Pop.Catalin</dc:creator><description>&lt;p&gt;Great article! Thank you!&lt;/p&gt;</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1054709</link><pubDate>Fri, 10 Nov 2006 20:01:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1054709</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;You are very welcome. &amp;nbsp;:-)&lt;/p&gt;
&lt;p&gt;Sue&lt;/p&gt;
</description></item><item><title>Application Compatibility in Windows CE 6.0</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1076403</link><pubDate>Tue, 14 Nov 2006 21:42:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1076403</guid><dc:creator>Windows CE Base Team Blog</dc:creator><description>&lt;p&gt;Posted by: Upender Sandadi One of the goals for Windows CE 6.0 design was full backward compatibility&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1103649</link><pubDate>Sun, 19 Nov 2006 17:35:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1103649</guid><dc:creator>Asang Dani</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I have worked with variety of Operating Systems for long time and &amp;quot;buffer duplication&amp;quot; that has been introduced in CE 6 is something that I haven't seen elsewhere. I also feel that CE 6 has done a very good job with &amp;quot;API Registration&amp;quot; which also includes &amp;quot;Signature&amp;quot; identification with &amp;quot;Pointer parameters&amp;quot; access checking being taken over inside trap-handlers. That certainly avoids lot of code duplication and potential mistakes on part of driver developers. No other OS provides such elaborate and general mechanims which can be seen in &amp;quot;RPC&amp;quot; ( Remote Procedure Call ) area, but not in system software. So a great job.&lt;/p&gt;
&lt;p&gt;At the same time I feel that CE 6 trap-handlers taking care of &amp;quot;pointer parameters&amp;quot; is going to make some people feel that &amp;quot;no validation&amp;quot; is needed and all pointers are always valid inside drivers. Of course it's not your fault. But doing things &amp;quot;under the hood&amp;quot; may make some DD programmer's forget that &amp;quot;someone&amp;quot; has to do it.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Asang..&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1109273</link><pubDate>Mon, 20 Nov 2006 19:24:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1109273</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;Hello Asang, thanks for your feedback!&lt;/p&gt;
&lt;p&gt;You're right, by automatically access checking pointer parameters, we run the risk that people will mistakenly assume they don't have to access check embedded pointers. &amp;nbsp;On the other hand, if we didn't automatically do those access checks, we'd be completely trusting everyone (including ourselves) to get buffer usage 100% right. &amp;nbsp;This way we at least close off one possible mistake. &amp;nbsp;It's definitely not perfect but I think it's the best choice to make.&lt;/p&gt;
&lt;p&gt;One thing that makes it slightly better is that user-mode drivers cannot use embedded pointers at all without first calling CeOpenCallerBuffer. &amp;nbsp;Hopefully that will be enough to get people into the habit of using CeOpenCallerBuffer on embedded pointers, even in kernel-mode drivers.&lt;/p&gt;
&lt;p&gt;Sue&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1112607</link><pubDate>Tue, 21 Nov 2006 05:42:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1112607</guid><dc:creator>Asang Dani</dc:creator><description>&lt;p&gt;Hello Sue,&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I agree with you completely. Overall, I am really happy to see the manner in which these changes were made in CE 6.0. At the same time, I am afraid MSDN documentation about CE 6 appears to be quite inadequate as of now. Secondly, there need to be one sample for each scenario for most people to make sense - of course I can write some samples myself, but if it comes from your team it's more authentic.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Asang..&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1115926</link><pubDate>Tue, 21 Nov 2006 19:12:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1115926</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;As to the documentation, I am told that there is a doc update shortly forthcoming. &amp;nbsp;So look forward to lots of improvements in the near future. &amp;nbsp;(You should get one of those notifications that updates are available.)&lt;/p&gt;
&lt;p&gt;I am sure our drivers team has good sample drivers for users to look at as examples of how to do the memory marshalling. &amp;nbsp;I would have to ask them for good examples though. &amp;nbsp;That is an excellent suggestion for another post; I hope to have something soon.&lt;/p&gt;
&lt;p&gt;Sue&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1120675</link><pubDate>Wed, 22 Nov 2006 09:43:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1120675</guid><dc:creator>Jiaoshouwu</dc:creator><description>&lt;p&gt;Good , good ,... articles!! &amp;nbsp;Thanks Sue!!&lt;/p&gt;
&lt;p&gt;From your introduction, &amp;quot;duplication&amp;quot; is one of the approaches to marshall memory as weell as &amp;quot;alias&amp;quot;. &amp;nbsp;Obviously, &amp;quot;alias&amp;quot; has higher performance than &amp;quot;duplication&amp;quot; for sparing memory-copy action. &amp;nbsp;Therefore, in WinCE 6, &amp;quot;alias&amp;quot; is the de facto way to implement memory marsharl? &lt;/p&gt;
&lt;p&gt;Besides, I cannot refer to the details for some APIs , such as CeAllocAsynchronousBuffer, &amp;nbsp;in MSDN. &amp;nbsp;Could u give me any suggestion about where to look up it? &amp;nbsp;Thanks a lot!!&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1121153</link><pubDate>Wed, 22 Nov 2006 11:17:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1121153</guid><dc:creator>Jiao shouwu</dc:creator><description>&lt;p&gt;'Secure copy' is the specific instance of &amp;quot;duplication&amp;quot; , right?&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1122566</link><pubDate>Wed, 22 Nov 2006 17:58:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1122566</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Actually you might be surprised to learn that we found that aliasing is NOT always faster than duplication. &amp;nbsp;On ARM at least, for small buffers (&amp;lt;8KB or so) duplication is faster than aliasing. &amp;nbsp;ARM has added issues that we have to make the source and dest buffer uncached while aliasing, to avoid cache coherency problems. &amp;nbsp;(Most ARM devices today have a virtually tagged cache, and memory must be uncached if you're going to alias it to two different virtual addresses.) &amp;nbsp;Maybe the boundary is smaller on other CPUs, but I believe that for pretty small buffers we may actually do best by duplicating, not aliasing. &amp;nbsp;So please don't make any assumptions about CeAllocAsynchronousBuffer. &amp;nbsp;It is the OS' job to make the right trade offs for performance and security in these marshalling APIs.&lt;/p&gt;
&lt;p&gt;I would say that 'secure copy' is duplication for the purpose of security, rather than for the purpose of marshalling.&lt;/p&gt;
&lt;p&gt;I am sorry to hear that some of the APIs did not end up being documented properly in our shipping documentation. &amp;nbsp;I've heard other people say that as well. &amp;nbsp;What I also heard is that there is a documentation update coming soon -- it will show up as a notification that updates are available inside Platform Builder / VS.&lt;/p&gt;
</description></item><item><title>Writing services for the WinCE 6.0 Kernel</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1166313</link><pubDate>Tue, 28 Nov 2006 20:03:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1166313</guid><dc:creator>Windows CE Networking Team WebLog</dc:creator><description>&lt;p&gt;When rewriting services.exe for the CE 6.0 kernel , we tried to make it so that as few changes as possible&lt;/p&gt;
</description></item><item><title>re: Memory marshalling in Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1205917</link><pubDate>Mon, 04 Dec 2006 18:38:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1205917</guid><dc:creator>ce_base</dc:creator><description>&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.windowsfordevices.com/articles/AT5831219184.html"&gt;http://www.windowsfordevices.com/articles/AT5831219184.html&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>MEMORY MARSHALLING IN WINDOWS CE 6.0</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1240340</link><pubDate>Fri, 08 Dec 2006 18:17:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1240340</guid><dc:creator>Dave Baker's WebLog</dc:creator><description>&lt;p&gt;Windows Embedded CE 6.0 introduced a new, &amp;quot;third generation&amp;quot; kernel. Unsurprisingly, changes to the kernel&lt;/p&gt;
</description></item><item><title>Hardcore pointer marshalling samples for Windows CE 6</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1400980</link><pubDate>Wed, 03 Jan 2007 02:45:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1400980</guid><dc:creator>Windows CE Networking Team WebLog</dc:creator><description>&lt;p&gt;This is one of those blogs where I hesitated to post it because it may be going too hard core into the&lt;/p&gt;
</description></item><item><title>Books and other resources for learning about Windows CE</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#1454138</link><pubDate>Fri, 12 Jan 2007 09:02:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1454138</guid><dc:creator>Windows CE Base Team Blog</dc:creator><description>&lt;p&gt;Posted by: Sue Loh I am occasionally asked whether I know any good books or other resources to help learn&lt;/p&gt;
</description></item><item><title>Article sur le marshalling m&amp;eacute;moire dans Windows CE 6.0 - Memory Marshalling in Windows CE 6.0 great article</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#2031680</link><pubDate>Thu, 05 Apr 2007 12:55:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2031680</guid><dc:creator>Olivier Bloch, Blog embarqué</dc:creator><description>&lt;p&gt;Dans la s&amp;#233;rie des excellents articles de Sue Loh , voici celui qui pr&amp;#233;sente le marshalling m&amp;#233;moire dans&lt;/p&gt;
</description></item><item><title>MARSHAL_FORCE_ALIAS</title><link>http://blogs.msdn.com/ce_base/archive/2006/11/09/Memory-marshalling-in-Windows-CE.aspx#8578603</link><pubDate>Fri, 06 Jun 2008 21:06:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8578603</guid><dc:creator>Windows CE Base Team Blog</dc:creator><description>&lt;p&gt;Posted by: Sue Loh Hello out there, it's been a long time since I posted anything real, and I feel sorry&lt;/p&gt;
</description></item></channel></rss>