<?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>How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx</link><description>I thought it's about time somebody gave a decent explanation as to how the shell handles low memory situations. This is mostly an FYI post but hopefully if you're writing an app for Windows Mobile you'll also stop and consider how well your app will behave</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#704536</link><pubDate>Thu, 17 Aug 2006 20:47:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:704536</guid><dc:creator>MelSam</dc:creator><description>Great post, Pat. Can you also talk a little about how a developer can simulate any of these low memory states? Is there any way to *make* your app recieve WM_HIBERNATE when debugging, other than manually sending it from another app, or loading a lot of apps at once?</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#704557</link><pubDate>Thu, 17 Aug 2006 21:12:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:704557</guid><dc:creator>Channa</dc:creator><description>Great post, I commend... Thank you. How can a C# app respond to these messages? Is there a clas available? I admit, I am new to C# development, and may have not noticed how, but, if you could, please post some hints, and that would be appreciated by many...!!! Thanks again.</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#704784</link><pubDate>Fri, 18 Aug 2006 00:17:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:704784</guid><dc:creator>windowsmobile</dc:creator><description>Great questions. In order to simulate a low memory state we internally use a simple app that gobbles up memory (we typically have to launch a couple instances of the app since a single app will usually exhaust virtual memory before it can exhaust the device memory, depending on the memory available on the device). I'll look into whether we can release that app externally and post back.&lt;br&gt;&lt;br&gt;For C# developers (or managed developers in general) you can handle the MobileDevice.Hibernate event (see &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/microsoft.windowsce.forms.mobiledevice.hibernate.aspx"&gt;http://msdn2.microsoft.com/en-us/library/microsoft.windowsce.forms.mobiledevice.hibernate.aspx&lt;/a&gt; for details) to see whether you should start freeing up resources. Your event handler should try to free up as many resources as possible in order to avoid the situation where the shell has to close the LRU app (which could be your app if you're not in the foreground!). &lt;br&gt;&lt;br&gt;-- Patrick Derks</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#707189</link><pubDate>Sat, 19 Aug 2006 08:53:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:707189</guid><dc:creator>Kiran Bellubbi</dc:creator><description>Hi WMTeam,&lt;br&gt;&lt;br&gt;I know this is a bit of off the blog post topic - but I am struggling with getting a Unit Testing framework working with .Net Compact Framweork. I was wondering how you all use unit tests to help you design your software... Have you experimented with some light weight unit testing frameworks? and if yes - can you share the dll's?&lt;br&gt;&lt;br&gt;PS: great job on the POOM the API is fantastic!</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#711684</link><pubDate>Tue, 22 Aug 2006 07:16:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:711684</guid><dc:creator>cutie</dc:creator><description>this is a great post.. i was veri worried about how my application will handle low memory state. It is a pocket pc application. since reading your post, i try to copy a few large files (images) to the device and run my application. but it just hang there...&lt;br&gt;then i try to open other application and it prompt me that the program memory is low and to close other runnning application, as you have describe. &lt;br&gt;&lt;br&gt;i looked in the link you have provide for managed developer (the application is a C#.net 1.0) but its for 2.0 only. so is there a way for .net compact 1.0 application to implement this? I need to maintain 1.0 for backward compatibility.&lt;br&gt;&lt;br&gt;Thanks alot.</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#712919</link><pubDate>Tue, 22 Aug 2006 20:41:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:712919</guid><dc:creator>windowsmobile</dc:creator><description>Unfortunately I don't think there is a way to get the WM_HIBERNATE message from a .NET CF 1.0 app. The WM_HIBERNATE message is sent only to top level non-owned windows and unless I'm mistaken &amp;nbsp;Microsoft.WindowsCE.Forms.MessageWindow doesn't meet this criteria.&lt;br&gt;&lt;br&gt;--Patrick Derks</description></item><item><title>Memory you can never have enough !</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#712990</link><pubDate>Tue, 22 Aug 2006 21:36:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:712990</guid><dc:creator>Jane Lewis's  Weblog</dc:creator><description>Well my order is in and I am waiting in great anticipation for my SPV M3100 to arrive.&amp;amp;amp;nbsp;I am looking...</description></item><item><title>Evento  Hibernate en Windows Mobile 5.0</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#713003</link><pubDate>Tue, 22 Aug 2006 21:53:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:713003</guid><dc:creator>Un gallego de bilbao con una PDA</dc:creator><description>Hace poco le&amp;amp;amp;iacute; un post en el blog de Windows Mobile acerca del manejo de situaciones de pocos recursos</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#728343</link><pubDate>Mon, 28 Aug 2006 16:56:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:728343</guid><dc:creator>Tweakradje</dc:creator><description>Hi,&lt;br&gt;&lt;br&gt;In wm2003se (and probably in wm5) there is a registry entry called&lt;br&gt;&lt;br&gt;HKLM\System\OOM&lt;br&gt;&amp;quot;AutoOOM&amp;quot;=dword:00000001&lt;br&gt;&lt;br&gt;Does it change the Out-Of-Memory Policy? And in what way?&lt;br&gt;&lt;br&gt;Cheers&lt;br&gt;</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#728564</link><pubDate>Mon, 28 Aug 2006 19:40:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:728564</guid><dc:creator>windowsmobile</dc:creator><description>The AutoOOM reg key is undocumented and therefore its ill advised to use it. Basically at the moment it will prevent the PocketPC &amp;quot;Out of memory dialog&amp;quot; (described in the &amp;quot;Kernel – Critical&amp;quot; section above) from being displayed. The kernel will instead decide which app to kill on the users behalf.&lt;br&gt;&lt;br&gt;--Pat Derks</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#734289</link><pubDate>Fri, 01 Sep 2006 01:24:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:734289</guid><dc:creator>Shaun Burks</dc:creator><description>I'm just curious why Pocket PC keeps applications running in the background anyway when the user &amp;quot;closes&amp;quot; them. &amp;nbsp; &amp;nbsp;Why don't we have a &amp;quot;minimize&amp;quot; and a true &amp;quot;close&amp;quot; option? &amp;nbsp;I'm not entirely sure how memory usage relates to energy consumption, but my pocket PC, when its battery gets low, tells me it doesn't have enough juice to run certain applications. &amp;nbsp;Furthermore, the MSN Messenger says to stay signed out to avoid consuming the battery. &amp;nbsp;It would therefore seem that the more you have in memory, the faster your battery will drain.&lt;br&gt;&lt;br&gt;Personally, I'm quite a bit annoyed that the only way to actually close an application is to go into Windows Mobile's equivelant of the task manager to do it. &amp;nbsp; &amp;nbsp;</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#735522</link><pubDate>Fri, 01 Sep 2006 19:52:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:735522</guid><dc:creator>windowsmobile</dc:creator><description>I'm not a big fan of the &amp;quot;smart minimize&amp;quot; functionality either on PocketPC. I believe the original reasoning behind it was to save the user from having to worry about managing the list of running applications and to just let the shell do it for them. &amp;nbsp;&lt;br&gt;&lt;br&gt;You're right in that a running application could decrease battery life if its doing stuff, but most GUI applications just sit around waiting for the user to do something so they're not eating any CPU cycles. MSN Messenger is an exception since it has an active data connection to update your contacts, be ready for incoming messages etc.&lt;br&gt;&lt;br&gt;&lt;br&gt;--Pat Derks</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#752419</link><pubDate>Wed, 13 Sep 2006 20:59:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:752419</guid><dc:creator>Alex</dc:creator><description> &amp;nbsp; Does anybody know how to turn off that process that runs every 5/30 sec and tries to close applications or change the threshold for that process?&lt;br&gt;Thanks,&lt;br&gt;Alex&lt;br&gt;alex.49.98@mail.ru&lt;br&gt;</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#762753</link><pubDate>Wed, 20 Sep 2006 01:34:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:762753</guid><dc:creator>Jeff</dc:creator><description>Patrick, in an earlier comment, you said:&lt;br&gt;&lt;br&gt;&amp;quot;I'll look into whether we can release that app externally and post back.&amp;quot;&lt;br&gt;&lt;br&gt;What's the status of this, can you release the memory gobbling app externally?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Jeff&lt;br&gt;&lt;br&gt;</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#868765</link><pubDate>Tue, 24 Oct 2006 18:31:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:868765</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;I assume that the low memory condition being checked here is physical memory only, since available virtual memory is a &amp;quot;per process&amp;quot; parameter. &amp;nbsp;My point is that app developers cannot rely on the shell to give them additional memory when they have expended their 32 MB of virtual memory, and since some Windows Mobile devices have consumed nearly half of the 32 MB process virtual memory in slot 0 with shared DLL's, the likelihood of running out of virtual memory before physical memory is very high.&lt;/p&gt;
</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#932248</link><pubDate>Thu, 02 Nov 2006 18:00:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:932248</guid><dc:creator>Narendra</dc:creator><description>&lt;p&gt;Does anybody know any tool which can simulate low memory condition in Windows mobile 2005?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Narendra&lt;/p&gt;
</description></item><item><title>Ninelocks  &amp;raquo; Blog Archive   &amp;raquo; Ever wondered how Windows mobile handles memory</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#2068319</link><pubDate>Tue, 10 Apr 2007 08:42:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2068319</guid><dc:creator>Ninelocks  » Blog Archive   » Ever wondered how Windows mobile handles memory</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.ninelocks.com/blog/?p=15"&gt;http://www.ninelocks.com/blog/?p=15&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#4048450</link><pubDate>Wed, 25 Jul 2007 23:00:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4048450</guid><dc:creator>Dave Haupert</dc:creator><description>&lt;p&gt;This is a very helpful article, but I still have a few questions about this after reading it.&lt;/p&gt;
&lt;p&gt;We have an application that handles large chunks of data. &amp;nbsp;The process is that they are read into memory from a file and put into arrays. &amp;nbsp;These arrays are held in memory until the user closes the program or saves the file explicitly. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So now a low memory situation comes up and the WM_HIBERNATE comes along. &amp;nbsp;We can try to free things up, but the only way to do that is to write the data to memory, which uses even more memory at that point. &amp;nbsp;So we can only free a few things at this point not the big chunks. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then the out of memory dialog comes up and asks user to choose an app. Say they choose our app. &amp;nbsp;Does it call us with the same event as the task manager close? &amp;nbsp;Do we have a way of knowing that we are closing because of an out of memory erorr? &amp;nbsp;Because if we did, we'd try to put the data on a storage card, or not attempt to write it out, knowing it would likely fail anyway and better to have the previous version than no version at all or a half written corrupted version.&lt;/p&gt;
&lt;p&gt;Further questions:&lt;/p&gt;
&lt;p&gt;Does this give us a set amount of time to close or does and then kill us (like the Shutdown calls on a regular windows desktop), or does it just kill us in this situation. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
</description></item><item><title>Slaying the Virtual Memory Monster</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#4660685</link><pubDate>Fri, 31 Aug 2007 07:51:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4660685</guid><dc:creator>The Windows Mobile RSS (Reed and Steve Stuff) Feed</dc:creator><description>&lt;p&gt;If you have ever heard one of my talks on Windows Mobile development, you may remember me ranting a bit&lt;/p&gt;
</description></item><item><title>MSDN Blog Postings  &amp;raquo; Slaying the Virtual Memory Monster</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#4662603</link><pubDate>Fri, 31 Aug 2007 10:40:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4662603</guid><dc:creator>MSDN Blog Postings  » Slaying the Virtual Memory Monster</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://msdnrss.thecoderblogs.com/2007/08/31/slaying-the-virtual-memory-monster/"&gt;http://msdnrss.thecoderblogs.com/2007/08/31/slaying-the-virtual-memory-monster/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Blackjack 2 Firmware - Crippled RAM? An update&amp;#8230; &amp;laquo; UberActive is neverMind</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#7111923</link><pubDate>Tue, 15 Jan 2008 00:36:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7111923</guid><dc:creator>Blackjack 2 Firmware - Crippled RAM? An update… « UberActive is neverMind</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://uberactive.wordpress.com/2008/01/14/blackjack-2-firmware-crippled-ram-an-update/"&gt;http://uberactive.wordpress.com/2008/01/14/blackjack-2-firmware-crippled-ram-an-update/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>How To Manage Windows CE 4.2 Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#7321544</link><pubDate>Wed, 30 Jan 2008 10:31:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7321544</guid><dc:creator>Herries E</dc:creator><description>&lt;p&gt;Hi, I'm using a device with Windows CE 4.2&lt;/p&gt;
&lt;p&gt;Our apps keep hangs suspected due to memory issues. Noticed the memory status in system properties shown available program memory &amp;lt; 1MB.&lt;/p&gt;
&lt;p&gt;Is this related to using Web Services in our apps !?&lt;/p&gt;
&lt;p&gt;Please advise.. Thanks in advance&lt;/p&gt;
&lt;p&gt;Herries E&lt;/p&gt;
</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#8672688</link><pubDate>Mon, 30 Jun 2008 22:54:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8672688</guid><dc:creator>susmitha</dc:creator><description>&lt;p&gt;Nice article, i was trying to sense a low memory situation from a memory leak.&lt;/p&gt;
&lt;p&gt;For exhausting the memory just run couple of instances of the GPS sample provided with windows mobile 6 SDK, that sample got memory leak and will finally throw 'out of memory' exception.&lt;/p&gt;
</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#9002626</link><pubDate>Fri, 17 Oct 2008 05:29:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9002626</guid><dc:creator>Jongsoon M</dc:creator><description>&lt;p&gt;I have a question about the &amp;quot;valid&amp;quot; application.&lt;/p&gt;
&lt;p&gt;If Service.exe meet with 4 Criteria that you mentioned, Is Service.exe within the scope of &amp;quot;valid&amp;quot; application?&lt;/p&gt;
&lt;p&gt;If Service.exe has a Window, Does Shell Send WM_HIBERNATE, WM_CLOSE to the Window?&lt;/p&gt;
&lt;p&gt;How about Home.exe?&lt;/p&gt;
&lt;p&gt;Could you answer the question?&lt;/p&gt;
</description></item><item><title>re: How the Windows Mobile 5.0 Shell Handles Low Memory Situations</title><link>http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx#9540013</link><pubDate>Thu, 09 Apr 2009 14:05:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9540013</guid><dc:creator>vishav sood</dc:creator><description>&lt;p&gt;hello i have developed application for windows 6.0 &amp;nbsp;mobile o2 xda &amp;nbsp;to communicate with Gps hardware ....&lt;/p&gt;
&lt;p&gt;i have used windows mobile 6 sdk and c# 3.5 for completing my application &lt;/p&gt;
&lt;p&gt;i have tested against fake gps provided by microsoft ... working fine....&lt;/p&gt;
&lt;p&gt; I want to deploy it &amp;nbsp;on O2 xda windows mobile....&lt;/p&gt;
&lt;p&gt;Plz tell How this can be achieved....&lt;/p&gt;
</description></item></channel></rss>