Who’s Using My RAM?


(Note: If words like "RAM" and "ROM" and "XIP" look strange to you, there is an entry here that explains their meanings.)


In my recent "Where's My RAM" entry, I explained why you tend to see a difference between what the WM5 device reports as "Total" RAM and what you know the device actually has.  In other words, "Why does my 64M RAM device say it only has 50M?"


In the comments for that entry people asked about the reported "In Use" numbers.  "In Use" shows how much of the total RAM the system is using right then.  The general consensus among the commenters was that WM5 took three times as much RAM to boot as WM2003 SE. 


This was shocking to me, because I know the steps we took to keep that from happening.  WM5 is a massive upgrade, with a new OS, new apps, and a ton of new features.  We were very worried about bloat, and did a number of things to combat it.  We funded a group whose sole job was to analyze performance (including RAM usage) and keep it under control.  Those folks did a bunch of work to reduce RAM usage.  We also purposely limited the amount of RAM available on the devices our developers used.  Almost all of our devices only had 32M of RAM, and the one device that had more, we artificially limited to only use 32M.  We didn't want anyone to get lazy.


So, one of our performance guys and I did some analysis to see what's going on here.  Did WM5 bloat up and use 3X the RAM that WM2003 SE did?  No, it didn't.  But, as you'll see, it's very easy to configure your system to use a lot of RAM, and some systems did that.



Granny Smiths vs Jonagolds
The challenge in comparing RAM usage between the two releases is in finding an apples to apples comparison.  And, what seemed like a nice place to do that was the emulators that plug into Visual Studio 2005.  There you can run both WM2003 SE and WM5 side by side.  And, conveniently, it's all Microsoft code.  If they're different, it must be our fault.


I did a PocketPC QVGA non-phone image on both.  I rebooted and went straight to the memory control panel.  WM2003 SE was using 5.16M.  WM5 was using 16.80M.  Gasp.  I clearly had some 'splainin' to do. 


It turns out that, while this is a pretty good apples to apples comparison, they're different kinds of apples.  The WM2003 SE emulator had been configured to act like it was XIPing.  The WM5 emulator had been configured to not act like it was XIPing.  Then, to compound the problem, the WM5 emulator doesn't have a page pool configured.  So all the code that should have been tucked away in a hidden page pool was actually being loaded into "In Use" RAM.  And that code accounted for just a bit under 10M. 


So, had we configured the WM5 emulator differently, it would have reported about 7M compared to the previous 5M.  That's still some growth, but it's not what I'd call "out of control bloat." 


Note that, aside from this discussion and the heart attack the numbers tried to give me, the emulator configuration really doesn't matter.  Now that we're aware of this, we may or may not change the emulator configuration for some later SDK.  But, even misconfigured the way it is, the WM5 emulator does its intended job perfectly well.



Yeah, but what about the real world?
We got our hands on one particular real world device that the OEM had upgraded, and analyzed the difference in RAM usage between its WM2003 SE image and its WM5 image.  This device was also showing about 10M more "In Use" RAM in the later version.


But there were different reasons for this one.  We did find that the SE version XIPed while the WM5 one did not.  But the WM5 one did use a page pool.  So it was configured correctly.  Since the page pool comes out of the Total and not the In Use RAM, that wouldn't account for the difference in RAM.


Digging deeper, we found that the Filesystem driver was using 4M more RAM than previously and the display driver was using another 4M more RAM.  That 8M, coupled with the 2M we saw in the emulator, pretty much explains the increase.


Now, I don't work with this OEM, so I don't have answers for why these changes were made.  But I can speculate.


First, why not XIP?  Most storage systems can't be read and written to and the same time.  NOR flash can't, NAND flash can't, hard drives can't, and most RAM can't.  Typically you access these things through a driver which queues up the requests and guarantees that it doesn't do a read and write at the same time.  When you're XIPing, however, it's extremely difficult to enforce this.  In WM2003 SE, all you ever did was read from the flash.  So it was easy to XIP.  WM5 added persistent storage.  Now you're writing user data to the flash.  XIPing is, in the end, a method of reading code directly from flash.  If the code that's writing the user data is being read from the flash, you're reading and writing at the same time.  There are ways around this, but it's a very challenging problem.  A less error-prone solution would be to stop XIPing.  It appears that is what the OEM in question did.


Second, why so much memory in the file system?  I'm guessing this also is a result of the move to persistent storage.  Flash is slower than RAM, so maybe the OEM was able to get a performance improvement with a large RAM buffer.  Does persistent storage require this?  No it doesn't.  Did the OEM decide it was worthwhile?  Maybe.


Third, why so much memory for the display driver?  I'm kind of drawing straws here.  Maybe they did a lot of buffering for DDraw performance?  (DDraw is new in WM5.)  I'm not sure.


In the end, however, the OEM saw WM5 give them 32M they didn't have access to before.  Persistent storage freed up a ton of RAM.  I'm guessing they decided that this enabled them to create some RAM buffers to tune performance.  And I'm mostly sure they did this intentionally. 



But that's only two examples
Yes, they were the two examples I could get my hands on.  But, in both cases, what I see are reasonable reasons for the increased RAM usage.  They're certainly confusing to the user.  They're even confusing to a developer on the Windows Mobile team.  But, in the end, there are explanations for them.  They're not just MS bloat. 


Mike Calligaro


Comments (125)

  1. M Freitas says:

    "I’m guessing they decided that this enabled them to create some RAM buffers to tune performance. And I’m mostly sure they did this intentionally"

    At the expense of unhappy users, and without much performance gain – it seems WM5 devices are slower than WM2003 anyway πŸ™

  2. Tim Markoski says:

    As a developer who makes a living supporting devices these devices, here’s my 2 cents.

    1) WM5 is a memory hog.

    2) 64Mb should be the minimum memory for deploying.

    128Mb should be considered the "standard".

    3) Samsung processors on WM5 devices can be problematic especially with low memory.

    I received consistent and repeatable VBScript memory errors with

    Samsung processors.

    4) Intel PXA270 Processors worked flawlessly in all situations I tested.

    This test was by no means meant to be definitive but it should give

    others a frame of reference.

    On the other hand, it does seem to be much more stable than PPC2003.

    The rub was that all PPC2003 handhelds were MARKEDLY faster in response.

    I then decided to do a side by side comparison of the new Palm TX and

    2 models of the HP iPaq line.

    The HP iPAQ rx1955 Pocket PC (Samsung SC32442 300MHz-32Mb-WM5 $299.99)

    consistently crashed. The same processor running PPC2003 had far fewer

    issues.

    The HP iPAQ hx2495 Pocket PC (Intel PXA270 520MHz-64MB-WM5 $399.99)was

    rock solid but unbelievable slow in response time.

    The Palm T|X (128MB-Intel 312 MHz ARM $299.00) SCREAMED in speed.

    Excel files opened instantaneously on the Palm with Documents-to-go.

    The same file opened slower than mollasses in January on the hx2495.

    It’s seem odd to me that Microsoft, HP, Dell and others think that

    systems, using 624Mhz processors with 256Mb of RAM and that operate

    much SLOWER with WM5 vs PPC2003 is a step forward.

    With all the hype from MS and PC-Mag about WM5 I must say that I was

    thoroughly UNimpressed with it.

  3. Alex Kac says:

    One thing I find interesting is that the Dell x50v and other HTC WM5 devices are very slow, RAM hungry and don’t seem to show the virtues of WM5 very well. The ETen 600 however seems to suffer from none of these issues. One review showed it from 50% to 1000% faster than a Dell with a faster CPU AND with 10-15MB more usable RAM to boot.

    So while I can understand the principles and reasons you’ve outlined and its now pretty sure that its not WM5 per se, it seems that HTC doesn’t have a clue how to properly design an image for WM5.

    Unfortunately, MS is in a situation where they are going to be blamed for all this. Not the OEM. When 90% of WM5 devices are sluggish, memory hogs, and crash prone, it seems that MS needs to put a stronger foot on their OEM’s throats. That’s a strange comment from me since I’m usually an open source/Mac OS advocate – but Windows Mobile is my favorite mobile platform (and I make a nice living from it) and I really want to see it flourish, but I feel like WM5 is giving MS a black eye.

    I’ve had many users revert back to Wm2003 from WM5 on their Dells. Dell doesn’t care; they sold a device and an upgrade. They got their money. MS may lose a customer, however.

  4. tmarkoski says:

    I find it extremely UNLIKELY that the problem lies with the OEMs on the WM5 memory issue.

    They have all forged very tight relationships with MS and all have significant leverage with the company.

    If there is any fault in this, it belongs squarely to Microsoft for poorly documenting the ‘quirks’ or what could be more properly described as flaws.

    To release an OS that results is WORSE performance than it’s predecessor is INEXCUSEABLE.

    It’s pretty clear to me that WM5 will go down in history as the single worst OS distro that MS has ever released.

    The OS was rushed.

    The hardware was rushed.

    99% of the implementations result in extrememly poor performance.

    I’m still waiting for a single proponent of WM5 to explain how WORSE performance is a step forward.

    Sorry MS, I’m NOT drinking the Kool-Aid.

    Windows Mobile 5 is making PalmOS look better every day.

  5. windowsmobile says:

    TMarkoski I’m sorry that it sounds like I’m trying to pull the wool over your eyes. That’s definitely not my intention. And I’m sorry that it sounds like I’m blaming an OEM for a problem. That also isn’t my intention.

    I’m trying to give you facts. "Here’s where the memory is being used." And I’m trying to give some insight on why the RAM might be used that way.

    There’s an assumption people are making that 10M of RAM being used on a 64M device is a problem. I disagree. WM5 freed up 32M of the RAM on the system. If an engineer looked at that and said, "This gives me the opportunity to do something I couldn’t do before." It’s not a "problem." You can argue that the engineer made the wrong choice. You can argue that a number hidden away on the second tab of control panel on the second tab of the rarely used Settings page is more important than anything any engineer could do with 4M of RAM. But I would disagree. There are valid uses for RAM, and as developers and engineers, it’s our job to weigh the costs and benefits of using it and make the best choices we can.

    You’re perfectly in your right to decide that we made the wrong choices and not buy our products as a result.

    As for performance, these two are tradeoffs we weigh. I’m not sure which performance differences you’re talking about, but I’ll give an example of a performance decrease that I find not only excusable, but correct.

    File system performance on WM5 PPCs is lower than it was on WM2003 SE. That is a direct result of the decision to move to persistent storage. It is our opinion that the benefits brought by persistent storage far outweigh the resultant increase in file write times. Just before the Thanksgiving holiday I put a trial 3rd party application on my PocketPC. Without realizing it, that application drained my batteries completely in two days, and on Saturday morning my device was dead. The benefit to me that all I had to do was plug it in, charge it back up, and not lose anything was ENORMOUS. I don’t find the sluggishness to be very noticable. I WOULD have noticed losing my data.

    But we understand that not everyone values the same features the same way. Maybe the speed of writing files to RAM is worth more to you than the value of being sure you won’t lose those files. And, maybe that means that WM5 isn’t for you. We understand that we can’t please everyone. But we’re honestly doing our best to make the best products we can. And we firmly believe that persistent storage products are better than non-PS ones.

    Mike Calligaro

  6. Justin Clay says:

    I think everyone realizes that the move to PS is a plus, but for anyone (like myself) who has been using a 2003SE device for some time now and is used to its performance, the move to WM5 is painful. I say this knowing that the WM5 upgrade for the x50v’s could be the problem, and not just WM5.

    None the less, the performance was dismal at best with the ROM that was shipped on the upgrade CD. Not to mention that the version of AS4 that shipped on the CD would only sync on about 1 in 10 tries on my Dell D800 laptop. I use my PDA for work and unfortunately didn’t have time to wait for AS 4.1, or for a new ROM update from Dell, however I hope that with their next ROM release and the improvements in AS 4.1, I’ll be able to return to WM5.

    On a positive note, when WM5 was working on my x50v, the newer version of IE seemed to be much snappier than the version in 2003SE. I also really appreciated the bullets and numbering features added to Word Mobile for taking notes in meetings.

  7. Przemek Gedek says:

    What I would like to know is if the next version of WM will offer the phone edition like awake/sleep support modes which cut off the battery usage or if WM6 will still be like #5 and eatup the battery by having all the applications running in the background trying to figure out if they should wake or not. I am refering to an article/blog posted somewhere on this site that touches on why Phone Edition of WM battery life is so much longer when comparted to that of WM5 (I would link you but I cant find the post)

    Also, any news/plans/ideas that the WM team is considering for the next version of WM OS? Would it be backwards compatible with current WM5 devices?

  8. windowsmobile says:

    Actually, the reverse it true. In regards to how power is done, we are much more likely to make PocketPCs act like Smartphones (always on) than to make Smartphones act like PocketPCs (suspend/resume). Here’s an entry that explains why:

    http://blogs.msdn.com/windowsmobile/archive/2005/08/01/446240.aspx

    Mike

  9. Rob says:

    I’m new to MS pdas, but with the uncertainty around Palm, I’m planning on giving WM5 a go.

    I just bought an i-mate spm5 to try this out and have been surprised by a lot of things – memory usage is one of them.

    the smp5 has 64 ram and 64 rom.

    I have NO applications installed, the pre-installed applications removed (where possible) and the huge files that I found in an install folder somewhere deleted (they failed to install, so they sat in a folder using huge ammounts of memory – why?)

    I now have 17mb of storage memory used – of which 10.02 is used.

    Not only is this less even than my treo – but as applications seem to be megabytes each, I am only going to be able to install a handful of apps.

    am I missing something – or is this really poor?

  10. lllr says:

    Is there anyway to control the system usage of memory in SP WM5 devices (ex. using program memory as storage memory)?

  11. Tim Markoski says:

    One of the big problems is something MS probably isn’t even aware of.

    The broke their own Common Controls with WM5.

    The Groups property of the OptionButton, as implemented in the

    Windows Mobile 5 operating system, does not work properly.

    I’m sure this isn’t helping memory issues as it is probably causing memory leaks in literally hundreds of applications.

  12. Perception says:

    Many have changed the registry to allow more memory cache to speed up the device which does use more RAM. However it is the only method to increase performance to 2003SE standards.

    I have an HTC Wizard PocketPC and before the registry edits for the memory cache and display the device would crawl. Now it is quicker but at the expense at using more RAM.

    Storage Memory is useless to me because of Memory Cards. Since I purchased the device I have added only 1.7mb to the storage memory leaving over 40mbs available. It dissapoints me that I have over 40mbs of memory that I cannot utilize while a lack or RAM is very apparent.

    When the developers review the OS have them review Windows Media Player 10. This application has to be the biggest memory hog on the device. Running the applicaion with an mp3 quickly uses 20mbs of RAM. However using a third party multimedia player the Wizard uses only 4mbs. We know that WMP10 runs in the background at startup because it handles all system sounds. I suspect WMP10 is a factor in why so much RAM is used at startup.

  13. NLS says:

    I am sorry "windowsmobile" but I think WM team people don’t really USE their PocketPC’s… that’s what I see.

    I mean you installed some "baaaad" (eeeevil hehehe) 3rd party application and you managed to empry your (WM2003SE I suppose) device without NOTICING? How frequently you actually use it? Maybe your team should use a normal battery meter in today screen? Maybe you should have implemented some "app autoshutdown" feature in WM that would stop the program if battery was too low? MAYBE YOUR DATA SHOULD BE IN STORAGE CARD? Maybe use a very interesting 3rd party program (where is shouldn’t be 3rd party) that is called intuitively "backup"?

    I read "explanations", I even read "real world" attempts. In fact I see excuses.

    WM5 is the first PDA OS that doesn’t make me want to use it AT ALL.

    Maybe it’s the OEM fault, but why should *I* care? Devices that were never ready (maybe they need really fast flashROM), consumers once more, guinea pigs.

    I don’t know if MS wants to tell us that 64MB are enough for everyone (which btw, reminds me of the comment B.G. made back then about 640Kb being enough for everyone – that today denies he ever said) but in ANY AND ALL of the WM5 devices I’ve seen (well in fact I think I’ve seen ALL officialy available WM5 devices) 64MB doesn’t LOOK enough and most of them devices are still slugish! (I mean how stupid does it seem to use RAM buffers to make the device faster, thus loose RAM BUT STILL manage to have a sluggish devise? duh!?)

    WM team seems to me it treats WM like another MS Win version where it shouldn’t be (heavy, heavy, heavier). Or maybe it should, but the hardware should go along. Then MS will argue about the OEMs. But then there OEMs are the only way we get to USE the OS. WM5 is not something you go and buy in a retail store and install in an "empty" (no-OS) PDA. So, to us consumers, MS WM and OEM are one and the same in this case.

    You say 64MB are enough, I say they are not. I am a heavy heavy PDA user.

    You say WM5 brings new things that make the bad not look so noticable. I say I don’t see the practical advantages of whatever you added, where I see everyday what you made worse (like speed).

    I backup whenever I install something new (and only when I am sure it stores something important in the stpd registry – because else I try keep the registry small and clean – a hard job to do since ANYTHING leaves it’s traces in reg). My vital files and data are already on storage. So WM5 "persistent storage" doesn’t really give me ANYTHING.

    I hoped to close this with a phrase like "keep up the good work"; but I cannot. You seem to be completely disconnected with your market. Please open your eyes and see. Unfortunately competitors are in fact dead for a while and this really shows. I they were not maybe WM5 would be something different today.

    I am sorry for the completely disorganized structure of my post, I wrote them as they came to me (and add to that that English is not my mother tongue).

  14. tmarkoski says:

    I have to agree with your post NLS.

    WM5 is just another example of MS being disconnected from it’s own customers.

    MS ought to actually try using their own products in real world environments.

    MS ought to seriously think about including this app with every WM5 distro.

    MemMaid memory management tool for Windows Mobile.

    http://www.pocketgear.com/software_detail.asp?id=14279

    This tool is a MUST for anyone using WM5.

    Do a soft reset of a WM5 device and then lauch MemMaid.

    You’ll see all the nasty little things like the Pocket Office apps already being loaded into memory to hide some of the shortcomings with speed.

    You’ll see what a poor OS WM5 really is.

  15. windowsmobile says:

    NLS, I’ll try to answer some of your questions:

    1) How much do I use Windows Mobile devices?

    I carry two (a PocketPC and a Smartphone) around with me everywhere. I don’t have a laptop. My devices are my primary source of email when I’m away from my desk. I write code for my devices and I use that code at least daily. My devices are usually at least one version later than whatever you can buy today. I’ve been running WM5 for a year and a half.

    2) The application that drained my battery did it overnight. I had a full battery when I left work at 6 pm. It was completely drained when I went to use it at 8 am the next morning. Because I carry two devices, it so happened that I was using the other one that night and didn’t notice the first one draining.

    3) You are a very knowledgeable, hard core user. That’s cool. I admit that we did not design WM5 around the assumption that our users would run backups after ever install, store all important files on secondary storage cards, and not worry if their batteries die. In fact, we based our decisions on the overwhelming feedback we received that users didn’t want to have to do all these things. They wanted a device they could trust to hold their data without taking all the extra steps you’re taking.

    It’s fair to say that our design decisions don’t always benefit our most hard core customers. It’s not fair to say that we’re disconnected from our customers in general. I guarantee that, of the millions of people who bought WM devices last year, only a small percentage of them ran backup programs after every install.

    4) In the end, if WM5 doesn’t offer you any advantages, you shouldn’t buy it. If your WM2003 device serves you better, then we’re happy to have served you at all. Maybe, by the time you’re ready for a new device, we’ll have released a version that does meet your needs.

    Mike Calligaro

  16. Brian says:

    Well, whomever is at fault, the situation is pretty bad.

    I just bought a new Palm Treo 700w. I was pretty excited, even though it cost $400, and nearly $95 /mo. to use. But, sadly, it’s going back.

    Why? Because it’s nearly useless as it’s been crippled with a rediculous 32MB of RAM. Reset the device, and it has 14MB free. Launch and then _kill_ ActiveSync and you’re permanently down to 10MB. Use it some more, and you pretty quickly get to near zero.

    Quiting apps doesn’t free memory, either. So here’s a device that _requires_ a periodic reset (and, remarkably, has the reset button hidden behind the battery door). How can we be at version 5 of this stuff and have it be this bad?

    I don’t want to bash MS, because I generally really like your stuff. But for all the hype with Bill on stage with the Verizon and Palm presidents, the idea that this thing ships with 32MB of memory (only 25MB is ever reported, btw) and leaks like a seive is a crime. Someone’s head should be on a stick somewhere.

  17. windowsmobile says:

    Brian, if you haven’t returned it yet, could you do me a favor? Boot the device, don’t kill anything, and don’t look at the memory control panel. Just use the device normally without thinking about RAM. If you have RAM problems doing that, can you post what applications you were running and what happened that made you know you were out of RAM?

    Thanks,

    Mike Calligaro

  18. Chris Green says:

    Mike,

    I have had the 700w since last Thursday. I agree with the previous poster that using 32MB was a bit of a joke, but I wanted to confirm you thoughts here. I’ve used the device for almost a week now without performing any kind of reset. I reset it just now to see how much memory was free after a boot. I have run multipl ethird party apps, I’m using active sync via our exchange server for scheduled syncs, and I’ve even run the beta version of Skype. The only way i’d know the ram was short would be to look at the memory gauge. The geek in me shudders when I do.

    Chris Green

  19. windowsmobile says:

    Chris, your experience is what I expect. I expect people who never look at the memory guage to never have any idea that they’re "short" on memory. I believe that the only problem is that people have a notion of how much free ram they should have and are disappointed when they look at the guage.

    If people were to say, "Nothing is working, so I looked at the memory guage, saw that all memory was in use, and came here to ask about it" I’d say, "Wow, there’s a big issue here we need to deal with."

    Instead I’m hearing, "Everything works fine, but I don’t like the numbers I’m reading on a control panel, so I’m angry."

    Yes, we’re all power users who really like to know what’s going on under the covers. But don’t let that curiosity spoil your experience. If the device is working for you, how much free ram is available is meaningless.

    It’s not like there’s some benefit to unused RAM. Much the contrary. Unused RAM wastes battery power for nothing. In trying to make the best device possible, OEMs tradeoff battery life vs RAM. I strongly believe that Palm made the right choice here.

    Mike Calligaro

  20. Brian says:

    Mike,

    Thanks for responding, and I apologize for the tone of my original post. I was pretty frustrated, since I’d been looking forward to this device for some time.

    Sadly, I did return the device (although I miss it), but I did have some experiences that you may be interested in. I agree that if I weren’t a developer, I probably wouldn’t care about memory unless it started to get in the way. Unfortunately, it did.

    What I found, was not encouraging. I had the device for about five days. During which I had not loaded any third-party apps. I was doing OTA ActiveSync with an Exchange Server about every 15 minutes, and otherwise was using the device normally.

    At some point I decided to open a 12 page document someone had sent me in Word. The device hung with the busy cursor. I reset, tried again and was able to open the document without difficulty. However, a day later the same thing happened. My recollection is that it was Word that was wedged, and not the device. I did some uncontrolled experiments where I tried to open enough apps to get low on memory, and then open the same word document, with mixed results.

    Installation of the CF2 framework (which really ought to be on the device already) failed due to lack of memory. Killing all apps did clear up enough memory to make that work. But it was, again, a stark reminder that the device is really memory starved. Since CF2 isn’t on the device, even a casual user may unwittingly need to install the CF2 as part of the first application that requires it.

    I’m really impressed with the persistent file store, and I definitely think that it adds a lot of value to WM. But, it also seems that the notion that 32MB is enough memory, especially when a paging area may be necessary, is, shall we just say, optimistic. In the case of the Treo, by the time the device and OS give the first app a shot, it’s looking at 15MB of available memory. That’s just rediculous. 64MB would have resolved that.

    I’ve been trying to speculate as to why the device is so limited. It can’t be cost; RAM is really cheap. It may be power; although, my smartphone that has half the battery and twice the RAM has at least twice the battery performance (yeah, I know the power management models are different). Then there’s the cynical side of me that wonders if Palm was worried about upstaging their other devices by putting more memory in this one; or worse, if MS was worried about being perceived as a memory hog by requiring it. Whatever the reason, the result is the same: a great device, slightly hobbled for probably no _good_ reason.

    One of the reasons that this irks me so much is that I have a shipping SW product for WM that is pretty substantial in size and I’m concerened that there are devices being manufactured that in real world environments just may not be able to adequately run it.

    BTW, can you help me understand what’s going on with ActiveSync? When I do an OTA sync it uses about 5MB of RAM that doesn’t seem to get released (or shown as free, anyway) when you kill the app. Interestingly, restarting ActiveSync doesn’t consume another 5MB.

    As a general comment about the Treo 700, I actually really loved the device in a lot of ways. But there were some real usability problems with it, too. I’m not saying that they’re all Microsoft’s fault, but I find my WM5 smartphone much more usable in a lot of ways, although it’s a better output than input device. I know this may sound crazy, but I wonder if the Treo would be a better device running the smartphone edition of WM, rather than the PDA variant. Although, it would still be nice to have a stylus when you want it.

    Thanks, Mike. I really appreciate your blogs. They’ve been very helpful.

  21. Mike Gio says:

    Mike,

    The lack of memory is a problem. Everywhere peopel are talking about how awesome the new PDA’s are as you can even run Quake 3 Arena on them. Actually, this isn’t true at all, as any new PDA you would buy (such as the Dell Axim X50v) is going to have Windows Mobile 5.0 on it already. And with a brand-new bare system there is 14MB used by the OS, and then an additional 20MB used by something else (what? I’d like to know), leaving only 30MB free! That isn’t enough to even start up Quake 3 which requires 35-40MB to run. And short of somehow stealing a copy of Windows CE 2003 (is it even sold anymore?), there is *nothing* I can do about it. I thought I bought the top of the line PDA with all the options, but it’s still not good enough.

  22. Will Cowman says:

    Mike,

    Thanks for your comment:

    "Everything works fine, but I don’t like the numbers I’m reading on a control panel, so I’m angry."

    Got the Treo 700w about a week ago and I’m just about grokin’ it (having been a palm user most of the past decade).

    I found that I was able to compensate for nearly every quirk and shortcoming through configuration (or the addition of a 3rd party app here and there) … then I started to stumble onto the memory problems.

    I would say that Brian’s comment pretty much summed-up my feelings:

    "…the idea that this thing ships with 32MB of memory (only 25MB is ever reported, btw) and leaks like a seive is a crime."

    That frustration is the /reason/ I Googled and found this thread. I’m glad I kept reading; because, your comment has settled me down a bit.

    That said, I am experiencing problems with this low memory when attempting simple tasks. I second Brian’s observation re: Pocket Word. It locks up on me (quite irregularly) when I’m pasting large amounts of text — and sometimes just attempting to open modest documents. I can’t quite pin down the pattern, but I’m already beginning to avoid the app (as it seems to be the only one I’ve encountered so far that gets into a state /requiring/ a soft reset to proceed). I suspect low memory here, but can’t really be sure.

    On the other hand, I really like SmartRSS reader (by BeetzStream) -and- I know I have a memory problem here. This is just an RSS reader, but it supports podcasts (and will launch MediaPlayer so you can hear them) — well, at least that’s the way it’s /supposed/ to work. I’ve cleared all other apps from memory except SmartRSS and it still can’t co-exist with Media Player (so I have to exit the reader and poke around with a file explorer to invoke the MP3).

    This is all annoying (but not nearly enough to make me reject the device). The thing that really still gets under my skin, though is that (by watching the memory) I’ve been able to determine that most applications will not give back as much memory as they take when stopped with the Task Manager. ActiveSync is the /worst/ offender by far of this. My machine starts free and clear with about 10.9MB available, but after just one ActiveSync cycle (with /no/ sync activities actually performed) WM5 takes me down to 7.3MB available. I can kill the ActiveSync application, but can never get memory to go much above 9MB available — that would seem to be a leak of nearly 2 precious MBs.

    So it boils down to this: Is there anything short of a soft reset that I can do to reclaim some of this lost memory? If not, would you have any recommendations re: utilities to re-assign some of my storage memory for use by applications? Is such a thing even possible?

  23. tmarkoski says:

    WHat’s truly amazing about all of this is the response from Microsoft and it’s agents/employees.

    The standard line is something akin to "You’re all idiots. We know best. Windows Mobile 5 is just fine."

    Repeating a lie doesn’t make it so.

    WM5 is truly a pig of an OS with so many memory leaks that I doubt they will ever be addressed.

    The person responsible for the Microsoft implementation of persistent memory should be fired immediately.

    Only Microsoft calls an OS that is slower than previous versions a step forward.

    Anyone defending the performance of WM5 must have a serious substance abuse problem.

  24. windowsmobile says:

    (Sorry folks that it’s taken me so long to respond. I’ve been under the gun for a tight deadline and haven’t had a chance to come up for air until today.)

    Brian, I’m sorry that you had to return your device. I hope we’re able to release a device that meets your needs in the future.

    I’m going to send yours and Will’s comments about pWord to the appropriate people. I know that we did a lot of work in pWord in WM5. The previous version stripped a lot of the formatting out of a word document and the new one is supposed to be much more compatible. But I don’t use pWord very much, so I don’t have any real experience to relate there.

    Regarding having an app that uses a lot of RAM, I think that concern is always going to be present. OEMs are trying to compete across a spectrum of devices and, as a result, you will always find devices with tight memory constraits. We frequently get requests from various OEMs who want to make a 4MB RAM smartphone so that they can compete with Feature phones. We kind of laugh nervously and tell them that would be impossible, but they keep asking. I don’t think you’ll see a 4M device any time soon, but you can be sure that there will be low end devices with as little RAM as is possible.

    Please understand, I am not saying that’s what Palm is doing. The Treo 700w is NOT a low end device. But it is a device tuned for a certain demographic. It’s aimed at heavy email users, and was tuned as such. Because they’re NOR based with NAND storage, both Palm and Microsoft felt that the 32M was enough for that demographic. We DO understand that it will be tough to play Quake Arena on it though.

    Will, many of the utilities that shut down apps don’t do it safely. Every app I write has an "exit" option on the menu. I know the official stance is that users don’t need to shut down apps. But I disagree with it. Of course, my apps also shut down gracefully when told to. So you don’t HAVE to use my Exit options if you don’t want to.

    However, if the app doesn’t have an Exit (and most don’t) then the best thing a utility can do is send a WM_CLOSE to it. If the app fails to close (either by ignoring the WM_CLOSE or by hanging) there’s no safe way to shut it down. Generally a utility will call TerminateProcess on it, but that is a terribly unsafe function to call. If the app is currently in a system call, it can leak kernel objects, etc.

    The Memory control panel will close things safely (it’ll only send WM_CLOSE). And the shell will also close things safely when it runs out of RAM. But, if you need to use a utility other than those to close stuff, that application is probably not being safe.

    All this said, I don’t know where that memory is going. I’ve never tried to terminate AS. I use it too much.

    TMarkoski: I’m sorry I’ve given you that impression. I most certainly do NOT think my users are idiots. However, I DO think that we have more information on how the system is working than they do.

    I’d like to forward your concerns to the right person, but I’m not fully following you. You said that it leaks too much RAM but that the persistent storage engineer should be fired. Persistent storage involves flash, not RAM. And, to my knowledge, there are no RAM leaks associated with Persistent Storage.

    And, yes, thoughout our history, our strategy has been to use processor and memory improvements to do more with software than we could do in the past. In almost all cases, a version that does more stuff will take longer to run than a version that does less stuff. We add those things because we honestly believe they make the product better. Our expectation is that people who don’t like the new features will continue to use the previous version of the product.

    I’m pretty sure that I don’t have a substance abuse problem, but maybe denial is the first step….

    Mike Calligaro

  25. Chris Green says:

    Mike,

    I posted a few days after getting my 700w and had no issues. I must say now that I have to soft reset the device at least once per week. I have issues with it coming back rom standby at times, and i have tons of slowdowns which seem tied to leaks somewhere or failed shutdowns as RAM is very low when it gets slow. I’m not planning to run GPS apps or other similar monsters here, but I should be able to do email, web, small games, and basic media playing. I’m deserately looking for a software update from Palm/Verizon. Hopefully it will come soon.

    Chris Green

  26. tmarkoski says:

    Mike-

    Obviously there are memory leaks in the OS itself.

    How else do you explain the need for so many users to have constantly perform resets?

    By being deliberately obtuse regarding this, you aren’t helping your cause.

    The stability issue with WM5 Memory is INEXUSABLE.

    Palm has had persistent memory for quite some time and has none of the speed issues that WM5 does.

    A 200 MHz processor has more than acceptable performance.

    ANY WM5 device with a processor running a clock speed more than 3x as fast is MARKEDLY slower than Palm’s WORST handheld.

    Sorry, but that is NOT impressive performance and all the obfuscation MS puts forth doesn’t hide the fact that the performance of WM5 is less than mediocre.

    The MS implementation of PM is, quite frankly, piss-poor.

    It’s also obvious that product testing has been drastically reduced.

    It will only get worse with .Net Compact Framework and all the utter nonsense that that brings with it.

    The whole point of these devices is that they are tools for the real world.

    The device itself should be an INCENTIVE for it’s own use.

    It’s obvious that Microsoft and it’s developers and sales staff simply don’t live in the real world.

    The fact that MS is so disconnected from the real world users and the problems with their products doesn’t bode well for the future.

    What’s even worse is that you people REFUSE to acknowledge the problems.

    All we get are lame excuses for piss-poor performance and finger pointing at the licensee.

    If Apple ever decided to get back into the PDA market they would put MS out of the PDA OS business.

    Their hardware and software is Kryptonite-proof compared to the track record you guys have.

  27. windowsmobile says:

    Chris, I don’t have direct influence on the parts your describing, but I can forward any information you provide to the right people. If you need to reboot, they’ll want to know a number of things:

    1) How you were using the device when it failed, what you were doing, what you were running, what was on or enabled, etc. Things like, “I had BTh on, an SD card in the slot. I was reading a lot of email and syncing regularly. I got a lot of phone calls and made a few myself.” Etc.

    2) What 3rd party software you have installed. We’re not trying to pin the blame on 3rd party software. But since we couldn’t test all of it ourselves, it will help to load the same stuff on our devices as you have on yours to try it.

    3) What caused you to reboot. Radio not working, not waking up from suspend, slowdowns, out of RAM, etc. You can either post information like that in a comment or send it directly to us with the “Email” link on the left bar (http://blogs.msdn.com/windowsmobile/contact.aspx)

    Mike Calligaro

  28. windowsmobile says:

    tmarkowski, there’s a long list of issues that could cause a user to perform a reset. A memory leak is one item on that list. And, even if it is a memory leak, that leak could be in a huge number of components. Those components span a fairly large number of categories, controlled by different people. It might be in the MS core OS, it might be in an MS core app, it might be in an OEM driver, it might be in an OEM app, it might be in a Mobile Operrator app, or it might be in a user-installed 3rd party app. I’ve owned and used products from every Windows CE mobile device release dating back to the original Handheld PC, and I’ve been affected by bugs in all 6 of those categories.

    It’s quite possible that there are memory leaks in the MS core OS. And, yes, we’re investigating that. But the fact that users are reporting the need to reset a device doesn’t do much to help us narrow down what the issue is or how to fix it. We need more data.

    Realize that a typical WM5 device has 70 MB of code on it, 35 of which were written by Microsoft. That there’s an issue with a device running our software and our users are unhappy is definitely our problem. But the solution to that problem might not be in code we have control of.

    As for performance, it’s no big admission from me to say that, yes, Persistent Storage is slower than RAM based storage. I’ve written 3 blog entries and a number of comments that said that.

    However, I truly believe that the benifts of PS outweigh the performance negatives. Performance is one of our goals, but it’s not the ONLY one. We make tradeoffs, and this was a case where the tradeoff was performance for data integrity. I believe we made the right choice. I know users who laboriously typed their contacts into a pre-WM5 device, then went on vacation and forgot to plug it in. When they got back and their data was gone, they threw the device out and never looked at PPC again. You may disagree with them. Performance may mean more to you. But they feel just as strongly that data integrity is more important than performance. However much we’d like to, we’re not going to please everyone. Cleary this time we didn’t please you. I’m sorry about that, but not enough to go back to RAM-based storage.

    In the end, if our product is inexecusably bad, don’t excuse us. Its your money, and you should hold us to whatever criteria suits you. If we don’t meet your criteria, you shouldn’t buy our products.

    Mike Calligaro

  29. tmarkoski says:

    Mike-

    Please stop the backpedaling and obfuscation.

    The idea the the benefits of the MS implementation of PM, YOUR implementation, outweigh performance degradation is nonsense on it’s face.

    You are correct, your products, WM5 IS INEXCUSABLEY BAD.

    I don’t cut you any slack on the issue and MS will NOT get any MORE of my money until the problems are addressed.

    I am recommending to all my customers to forgoe WM5 until MS gets the product in a semi-usable state.

    Please address a few simple questions.

    1) What can’t Microsoft match the speed performance of Palm’s worst handheld with hardware clock speeds more than 3x as great?

    Palm has PM and NONE of the memory issues MS does.

    2) Why are so MANY WM5 users having performance issues resulting in multiple and repeatable resets?

    3) Why are these problems across the entire hardware spectrum?

    Just google JasJar, Axim, Ipaq, Palm Treo 700 along with WM5 Memeory problems.

    4) Who in their right mind at MS though that 32 Mb of RAM was enough for the Palm Treo 700 with WM5?

    5) Why hasn’t Microsoft even begun to deal with these issues in an honest and forthright manner?

    6) Why doesn’t MS at the very least recommend SD Cards for those who will be installing multiple 3rd party apps?

    The silence from Redmond speaks volumes.

  30. Frank says:

    This may not be directly related to this thread, but I would like to know how I can diagnose memory leaks in a WM5 application?

    I understand that Application Verifier is an appropriate tool, but that a version that supports WM5 is not available.

    Recommendations?

    Thanks,

    Frank

  31. windowsmobile says:

    tmarkoski my last post was, in my mind at least, an honest attempt to explain that the situation is more complex than "a user had to reset, so there must be a leak in the core OS." If it comes across as nothing but backpedaling and obfuscation, then my writing skill isn’t up to the task of answering your qustions in a way you’ll find acceptable.

    I have answers to your 6 questions, but your responses to my previous attempts have shown that what I write, no matter how truthful, will not be believed. So, since you’ve asked me to stop, I will.

    Whatever device you use to replace your WM one, I honestly hope it meets your needs and that you enjoy it. Life is too short to get this worked up over a phone.

    Mike Calligaro

  32. windowsmobile says:

    Frank, is the issue you’re seeing that App Verifier doesn’t work with WM5 or that it doesn’t work with apps built with Visual Studio 2005?

    I’m digging around and hearing conflicting things. I want to make sure I’m looking at the right problem.

    Mike

  33. windowsmobile says:

    Frank, I found the following article written by Doug Boling that describes how to use App Verifier with WM5 to find memory leaks.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce50/html/appverifier_wince.asp

    I hope that helps.

    Mike Calligaro

  34. windowsmobile says:

    <sighs> Frank, can you tell that I didn’t actually READ Doug’s paper? <embarrased> Sorry.

    I’ll keep digging for an App Verifier on WM5 solution and post it here when I find one.

    Mike

  35. Brian says:

    Mike,

    While I think tmarkowski is incredibly rude, I feel some of the same frustration. No doubt everything you’ve said is true. But that the devices are slower and yield a lot less usable memory is also true. While I’m willing to trade some speed in the file system for persistance, others may not be so happy about that deal.

    What frustrates me is the unwavering attitude at MS that a device that starts with 15MB of usable memory is a good thing. I beg to differ; quite strongly, actually. You’ve made the argument that to add features to the OS has required more memory and processor bandwitdh. But third party apps are no different. So how come you guys get all the memory, and we’re left with 10MB (after ActiveSync takes its share)?

    I have another small nit to pick while I’m on my soapbox. What is up with the .NET CF? Is there some reason you guys can’t coordinate releases? It’s incredible to me that, so far as I know, there’s not a single device shipping with WM5 that has version 2 of the .NET CF preinstalled in ROM. How are we supposed to take .NET seriously as a development platform if it’s unavailable on the devices? Yes, I know the user can download and install it. But, many will bulk at that, and as a developer I don’t want to be faced with having to worry about whether the user’s machine is pre-configured properly. Hell, I might was well use Java.

    In fact, I have a client who is asking me to do some Java development (something I’ve done a lot of in the past). I’ve invested a lot over the past year to make the transition to .NET, yet with the recent MSDN policy changes, the lack of a .NET environment preinstalled on any machines, and the really, really BAD MSDN support experiences I’ve had recently, I’m really thinking of going back into the Java camp. At least then I can transition to another platform if MS continues on this trend.

    I know you guys have competing priorites, it’s just that lately I find yours and mine increasingly misaligned.

  36. Frank says:

    Mike,

    Thanks for trying to find a version of App Verifier that works for Windows Mobile 5. I could really use this now. I will be waiting…

    Frank

  37. windowsmobile says:

    Brian, how about "32M of RAM is an acceptable ammount" as apposed to "32M of RAM is a good amount"? You’re absolutely right that having more RAM enables bigger and better ISV apps. And ISV apps are our future in this space.

    My unwavering attitude is that we’re CAPABLE of running acceptably in 32M. We designed our system to work in 32M, did all our testing on 32M devices, and we stringently held ourselves to a 32M bar. We did this so that someone COULD release a 32M device. And we did this so that if someone released a 64M device, it would have a lot of spare RAM. If we hadn’t gone to those lengths, we’d have bloated up and people would be complaining that you only have 15M free on a 64M device.

    So there’s some degree of pride getting in our way here. And, thanks to your post, I understand that said pride is grating on you, the ISV. I’m sorry for that. You’re right that it’s hard to write a memory intensive ISV app that fits in the available space of a 32M device.

    That said, maybe there are things we can do to help your situation. If you’d like to follow up with me offline and tell me what you’re doing, I’ll see if I can help you find ways to squeeze it into the space available. Maybe you already know everything I know or maybe I have some tricks you haven’t heard of yet. It doesn’t hurt to try. Hit the "Contact us" button and send me your email address.

    As for the .net situation. That was a challenge. We wanted to put .net 2.0 in WM5. But .net 2.0 wasn’t done by the time we shipped. We were faced with holding shipment of WM5 or shipping without .net 2.0. It was a hard decision, and it remains to be seen whether or not we made the right one. Remember that it takes a fair amount of time between when the OS is shipped and when OEMs can ship devices with it. We probably wouldn’t have WM5 devices on the market yet if we had waited for .net 2.0. It’s hard to say whether that would be better or worse than the current situation.

    As for taking .net seriously when it’s not on the devices, I assume you mean "taking .net 2.0 seriously" and not just "taking .net seriously." .net 1.1 is on all WM2003 and WM5 devices and is also on some WM2002 devices.

    You’re right though, that it’s hard to take .net 2.0 seriously until it doesn’t require the user to install a large executable. You’ll note that most of the apps I wrote in December use net 1.1. There are features in net 2.0 I’m really interested in, but I’m not willing to make my users install it for my little app.

    I’m sorry that our priorities are misaligned. I hope we improve things for you in the future. And, if you do go to Java, I hope we see you back when we start meeting your needs.

    Mike Calligaro

  38. tmarkoski says:

    If I’m rude it’s because MS refuses to acknowledge that a problem even exists when they know it does.

    It’s truly amazing that no one at MS acknowledges that there are MAJOR PROBLEMS with WM5.

    My guess is it will take a class action suit against MS and the hardware vendors for

    for knowingly selling a product that doesn’t perform a stated.

    The Treo 700 will be the unit that forces MS to get it right.

    A major tech product that is clearly sold as a multi-tasking communications tool and can’t perform as such.

    It can’t perform because the OS is pure junk.

  39. Brian says:

    Mike, I appreciate the offer to help with my app’s memory needs. But, my problem isn’t so much that I need to squeeze a few more bytes out of my app, it’s that a user of a 32MB device will already have other apps eating up memory, and the margin is just too thin. Anyway, for now, I think I’ll maintain my anonymity. But, as this is a great forum for me to pass along some constructive criticism anonymously, please indulge one more time.

    You guys have some really great stuff. Yet, there’s a remarkable inability to bring it all together into complete products. With all the fanfare around the release of WM5, it has managed to ship without at least three MAJOR features: CF2, VoiceCommand over BTh (making it all but useless in the real world), and MSFP. While I realize that you may have gotten blind-sided by a patent suit on MSFP (I’m assuming that’s what’s holding it up), your failure to anticipate this, or coordinate release schedules is surprising. It’s not like you’re short on lawyers or other resources. Shipping WM5 without this set of critical features has taken a lot of the thunder out of its release, which is a shame. If needed, it should have been delayed until all of the necessary components were complete. As it is, it’s a big disappointment.

    The other thing I see, which bothers me as an ISV is a continuing trend towards seeing developers as yet another market whose wallets are to be mined, rather than the critical partners that we are. Apple and Palm get it; their tools are free. MS, on the other hand seems intent on finding more clever ways of charging developers for tools. As it is, I’m paying $800 a year for a tools subcription that compiles to a runtime nobody has. Yes, I could use CF1.1, but then why am I buying new tools if I can’t use them? And, yeah, I could write my app in C++ (my last WM app was ~100K lines of ATL C++), but I’m getting too old to worry about the niggly little details that a decent runtime will handle for me. Apprently you guys feel the same way, because you’ve clearly invested a lot in .NET and its associated tools. Yet, much of that investment will go to waste because developers won’t use them for the afformentioned reasons.

    Anyway, from here, it looks like you guys need MUCH better management.

  40. MikeCal says:

    Hey Brian,

    If it’s an issue with wanting to stay anonymous, you could always grab a hotmail account or something, use it for a while, and then get rid of it.  But no big deal either way.

    If your app’s needs are being squeezed by other apps, maybe a call to SHCloseApps would help?  It sucks that an application would need to think about such things, but in the case of an application doing a large allocation, it’s a tool you can use.  Typical apps that do a bunch of small allocations instead of one big one wouldn’t need to call SHCloseApps, but if you’ve got a big data set, it might help you.

    Thanks for the constructive feedback.  I’m not sure if things are better or worse than you think, but two of the features you mentioned were never intended for WM5’s release.  So it’s not so much that we hoped to do those things, they slipped, and we shipped without them.  Instead, we failed to recognize them as important features in the WM5 timeframe.  Like I said, that might be worse in your eyes.  (-:

    MSFP in particular (assuming I’m remembering my acronyms correctly and we’re talking about the same thing) is the first in our attempts to do smaller, updateable releases rather than giant multi-year releases that cause our OEMs to redesign their hardware and not do updates.  We’re trying to do things this way due to feedback from end users that they want updates on their devices, feedback from OEMs that they want changes in managable chunks that don’t require large changes on their part, and feedback from mobile opperators that they prefer many small releases to one big release every few years.  It remains to be seen whether or not this scheme will be better or worse for everyone.  It’s certainly harder on us, but it’s what our customers want so we’re trying to heed their wishes.

    Mike  

  41. kaz says:

    I think a lot of the frustration would be alleviated if people realised that MS was getting the message that things need to be improved. As it is, with the attitude that tradeoffs have been made for "non-power" users, it would appear that nothing needs to be fixed.

    However, I think "non-power" users would like to be able to answer their phones. I have an XDA Exec, and the process of taking a call is so incredibly slow that I am really struggling to stay with this device. Whenever I go back to my WM2003SE device, its speed blows me away and makes me wonder why I am still persevering. It’s also the case that on my XDA2, I NEVER worried about memory, while now I have to.

    I appreciate that MS needs to target the mass market. Yes, persistent storage is useful, but at ANY price? Even at the price of using my device for its intended purpose (taking calls)?

    Perhaps some performance benchmarks that compare apples to apples would be helpful in ramming the point home (if you haven’t already realised).

  42. MikeCal says:

    Kaz, we’re definitely getting the message that things need to be improved.  My explanations have been intended to show why we made the decisions we made.  I’m NOT saying, "Things are good enough, so we’re not going to improve anything."  

    I’m also trying to show that the situation is more complex than persistent storage vs ram based storage.  If you’re having trouble answering the phone on a WM5 device, there are bigger issues at hand than where user data is stored.  We’ve been answering phone calls on persistent storage devices for over six years now.  That scenario is HEAVILLY tested.  If I was debugging the "answering phone calls is too slow on this device" problem, persistent storage isn’t where I’d start my investigation.

    Similarly, if you’re worrying about RAM on a 64M RAM WM5 device where you didn’t need to on a 128M WM2003 device, there’s something else going on.  A 128M WM2003 device defaulted to using less than 64M of the RAM as RAM in the first place.  

    However, the fact that I don’t know the answer to why your device is running slowly does NOT mean that Microsoft isn’t interested in the problem.  I’m just one developer in an area unrelated to the problem you’re describing.  The Windows Mobile team is too large for me to know everything being done in every part of it.  I do try to keep abrest of these things, but my day job gets in the way sometimes.

    Mike

  43. Brian says:

    Mike,

    Thanks for posting and for taking all the heat here. To be clear, I don’t for a second think that MS isn’t trying hard to do the best they can. But, as you alluded to, we probably have different ideas of exactly what you guys should be doing.

    Regarding more frequent updates, I like the idea, but I’m not happy with the implementation plan that I’ve heard. By rolling things into new ROM image releases everybody now has something extra to worry about. As a user I need to be concerned about whether the OEM and carrier want to be bothered to release new ROM images for a device they’ve already sold. And as a developer I now have even more permutations of the platform to support.

    What would be better, in my opinion, is if you had much brighter line between platform and applications. I would hope that the platform would be fairly stable and changed infrequently, kind of like what you guys have done in the past. Conversely, I’d really like to see more frequent feature updates through downloads directly from Microsoft. If ISVs can ship applications to a wide array of installed devices, then MS ought to be able to provide application updates without needing to involve the OEMs and carriers.

    BTW, two changes to PocketOutlook that I’d really like to see are: email paging on a smartphone device, and hiding of link URIs in messages. Right now, when I get an email littered with links it’s a real pain to read, partly because the message is poluted with two forms of each link (the label and the URI), and partly because skipping past them is only possible by scrolling one line at a time using the five-way navigator. IE has the same mis-feature, although there’s a registry hack that adds navigational keys, which totally redeems it (why aren’t these on by default??).

  44. MikeCal says:

    Hey Brian,

    Though we are working to make a darker line between the platform and applications, our partners are not keen on us distributing updates ourselves.  The mobile operators, in particular, want to have full say on what goes onto their network.  Some are more stringent than others (that’s why some disallow all 3rd party applications and others allow them), but all want final say on which of our official releases goes on their phones.  This isn’t really the forum to discuss the pros and cons of MO requirements, but, suffice to say, the challenges are more than just technical.  

    Thanks for the suggestions on pOutlook.  I forwarded them to the right people.  No idea if they’ll do anything with them, of course, but at least they’ll see them.

    Mike

  45. Matthew says:

    Hello Mike,

    Just read your your blog and it is quite informative. As a regular user (NOT developer), I just want to know more about the slow down issues. I really like Microsoft’s products but I was quite disappointed by the speed. Anyway (sorry if it’s not related to the main topic), my upgraded x50v has been extremely slow due to a thread called "filesys.exe" that runs in background very often and uses 100% CPU. Start menu alone takes 10-15 seconds to pop up when this it happening. However, I understand that this is a Dell issues since only Dell device has this problem. I just want to know if what’s causing the problem exactly and any possible solutions.

    I have been using PPC for a while now and I like all the features and advantages it has over Palm. However, stability and speed has always been an issue for me. I think Windows Mobile would be much better if Microsoft can concentrate on making OS light, fast, and stable. This really should be  Micorsoft’s top priority since not matter how powerful and great the OS is, people need a reliable device. There are many occasions which  my device just freeze upon me while I’m taking important notes and doing other tasks. I feel that Microsoft’s focused too much on adding new features and ignored various problems and concerns that surfaced. As others stated, WM5 takes up just too much resources in comparison to what OEM offers. After all, it’s just hard to accept that device with 624mhz CPU is actually slower than 200mhz Palm devices.

    Thank you for reading this and I really hope that you can directly explain some of my concerns. Again, thank you for your hard work.

    P.S. Can also check out the following links? What might be causing the problem?

    http://www.aximsite.com/boards/showthread.php?t=112194

    http://www.aximsite.com/boards/showthread.php?t=106009

  46. Kaz says:

    Mike, can I just cheer you up? You’re taking a lot of heat and doing a great job of responding in a polite and thoughtful way. I’m delighted to hear you’re taking the criticisms on board. In most cases I suspect (certainly in mine), they come from a committed Windows Mobile enthusiast, and are well intentioned (i.e. we’re all looking forward to the service pack that deals with these issues).

    Matthew, I can tell you that the problem with the Start Menu taking 10-15 seconds to start is not exclusively a Dell issue. I also get it on my XDA Exec (although both are made by HTC I think?). I have no idea why this sometimes happens, though I have noticed that there are still errors with duplicates clogging up the notification queue, and weeding those out sometimes helps.

  47. Brian says:

    Mike,

    Can you suggest some good tools for investigating an apps memory usage? I’ve used remote heap walker, but it’s a little weak. While it does give me a look at the heap, it doesn’t do much analysis such as telling me the overall memory footprint of my app, or statistics on fragmentation, etc. There must be something better than this around. Any suggestions?

    Thanks

  48. Drumbo says:

    Hi Mike,

    I just wanted to drop my 2c (don’t we all) in to this as a person who is neither a power power user nor a developer. 1st off (and I think it has been mentioned already) – hats off to you for always being polite to what sometimes does seem to become a "bashing" situation – your blog thus makes for an interesting read.

    The second thing was around the issue of memory. I have used devices since the PPC2000 era and have been plagued by memory issues. the Hx4700 being the worst. So often bluetooth would not  startup (no device memory), apps would suddenly stop and there was little or no chance of opening multiple apps like PI, Netfront etc. I have subsequently upgraded to the Universal (O2 Exec) and my first experience with WM5. Despite the fact that it is slower (and your points above are taken), the memory management is sooooo much better. Even having the memory heavy VGA capability and the phone capabilities – I am now able to open all the big apps mentioned above without them closing on me. Fantastic – so much better than the old hx4700

    There are bugs (slowness, reduced battery life, etc) but overall – a great improvement and hopefully issues (like above) will be fixed/made better in future "patches"

    So, a thankyou for both the info you provide in this blog and to the WM team for continually working on making "life" more mobile

  49. Matthew D says:

    Mike,

    I have a couple of questions for you (one that I don’t know if you can answer)…

    I bought a Treo 700w. The Verizon website and the box both say "128MB/60MB Storage." What does that mean? Nowhere is there 128MB of anything. Even with the "Storage" and "Program" memory combined I only have about 88MB of memory (about 63MB of "Storage" memory and about 25.5MB of "Program" memory). Where are they getting that?

    Secondly, what am I supposed to do? My Treo has a lot of lag. And, not when I’m using several programs. When I’m writing a text message and get a call, it sometimes freezes or locks up for a while. It seems I can’t multi task at all. I can maybe have one thing running at a time. If I try to do something else, it lags or freezes up. I’m on my second one. The first definitely had something wrong with it. So hopin it was just that particular phone, I went back and got a new one. Some of the same problems still exist.

    So, what am I supposed to do. How do I get this thing to do anything. Do I need to scrap the whole idea of the phone, and go back to my Motorola flip phone? Am I using it incorrectly? Are you supposed to be able to do more than one thing? Can I optimize it in any way? I jus don’t know what to do. I want this to work, but I just don’t know if it will.

    My last question, will there ever be any update to this thing that will allow for the memory control like the PPC 2003? I want to be able to allocate more memory to programs running, and use my SD card to install programs and store photos and the like.

    Please give me some direction. Thank you.

    -Matthew

  50. Matthew D says:

    One more question I forgot to add…

    What should I do when I have no programs running (I have stopped them all in the "Running Programs List") and I can’t use the phone because its lagging? I missed calls this morning because of this issue. They didn’t even ring my phone. They just went straight to voicemail.

    You said not to look at the memory usage and just use the phone, but I looked when this happened. I only had 2MB of free "Program" memory. What to do?

    Thanks again,

    -Matthew

  51. MikeCal says:

    Matthew, the Treo 700w has 64M of flash used for the opperating system and programs that come with it and another 64M of flash used for storage.  The numbers on the box are marketing, and marketers work in mysterious ways, but this time doesn’t seem too far off the mark.  Similarly, when you buy a PC with a 60G hard drive, you’ll find that you don’t have all 60G available because the opperating system is using some of it.  You just typically don’t notice that because PCs have way more hard drive space than they need, and mobile devices don’t (yet).

    Regarding your other questions.  Have you installed any programs on your device other than the ones that it came with?  I live and die by mine, and I don’t see the kinds of lag you’re describing.  However, in the past I’ve installed various other programs (games and things) on my devices and had them cause problems like you’re describing.  It’s hard to make suggestions without knowing what you have on your device.

    Mike

  52. jdecker says:

    Brian,

    If you are a developer, try entrel toolbox:

    http://www.entrek.com/

    I have used their tool extensively to map out every byte of memory in my 32MB virtual address space.  Shows me exactly where my app, all its dlls, everything byte of memory I allocate (new()), etc.

    I have another tool, I forgot what it is called, that will map out all the device memory that is shown in the memory control panel (the program memory).  I’ll search around for that.

  53. Brian says:

    Thanks, jdecker.

  54. Eize says:

    In response to Matthew:

    <I>I missed calls this morning because of this issue. They didn’t even ring my phone. They just went straight to voicemail. </I>

    It is more likely the case that you were transfering data over GPRS at that time. None of the currently used class B GSM modems support receive of calls while actively transferring data.

  55. Inachu says:

    I will not buy a pda until your hardware hackers will let users be able to upgrade the device themselves to 2 gigs of memory.

    having hand held devices not being able to adress lots of memory is a bore for me.

  56. Inachu says:

    I hope by 2008 my future pda can handle 30 gigs of ram

  57. MikeCal says:

    Inachu, do you really mean 30 gigs of RAM?  Are you sure you’re not asking for 30 gigs of storage?  Typical desktop machines have 30+ gigs of hard drive space (storage) but very few have more than 1 or 2 gigs of RAM.  It’s surprising to hear that you want an order of magnitude more RAM on your PDA than your desktop has.  

    I can think of a ton of uses for 30 gigs of storage.  If you’re looking for 30 gigs of RAM though, I’d love to hear more about what you’re planning to do with it.  

    While WM devices won’t have 30G of RAM anytime soon, we support that much storage today.  If an OEM wants to put a hard drive (or an enormous amount of flash) into one of our devices, we’d support it.  

    Mike

  58. luphy says:

    Mike,

    I too just want to say thanks for creating this very informative blog and for being so amazingly polite, especially to the incredibly and unreasonably rude TMarkoski.  

    I know you’re too polite to say it, but chill Tmarkoski (down boy, down!) – if you don’t like your device, return it and get a WM2003SE or a Palm.  Life’s too short for you to get so worked up by something this silly, and it’s definitely too short for anyone here to have to deal with your abuse.

    Anyways, I’m using the x51v with the A06 ROM and have no problems with memory leaks or problems with running out of RAM.  And if I have to soft reset every so often, so what?

    I could have several books opened, a calculator, Mortplayer, and it’d work fine.  Sure I don’t play Quake or Doom or what have you, but I didn’t buy my device to do that.  If you have a problem with having only 64mb RAM, take it up with the OEM, or complain to the makers of the game because their games require too much RAM!

  59. MikeCal says:

    Hi everyone,

    There are only four reasons that I’ll delete a comment from this blog.

    1) It’s an accidental duplicate.  (I’ll remove the dupe.)

    2) It’s porn.

    3) It’s unrelated spam.

    4) It’s hate speech directed at someone other than Microsoft.

    Thankfully, I haven’t had to invoke reason number 4 yet.  Sadly, today I need to.  I’m deleting tmarkoski’s most recent comment.  

    Tim, say what you want about Microsoft, its products, and its employees.  But leave luphy and every other reader of this blog out of it.  

    Mike Calligaro

  60. tmarkoski says:

    There was NOTHING that could remotely be classified as hate speech in my post.

    I called him an apologist for MS and told him to address his cranial-rectal inversion.

    You have just proven that you are a LIAR!

  61. Ted says:

    I’m a developer, but not for mobile devices.

    I just happened to get the 700w (Verizon). I seem to have had the same problem about 2/3 users have syncing to Exchange2003 … 2 weeks and many hours of IT time. Maybe getting closer.

    In the meantime, doing email with GOTOmyPC. Runs fine after a reboot. But run just a few of the built in apps, and then try it after closing everything down; and "not enough memory to run the program" (less than 8MB). Pretty frustrating.

  62. gailand says:

    Although it probably has been answered before, is there ANY way to alter the memory settings to reduce persistant storage to allow for more program memory?  I have a Jasjar WM 2005 device.  After deleting some applications from Extended_Rom I now have 35.7 MB free of storage and 26.35 of Memory.  I had to hard reset my device because after installing TomTom5, every time the system would go to sleep, it refused to wake back up.  Why can’t we select where we want installed apps to go?  After all, SD cards are cheap, they don’t use nearly as much battery life, and expand upon how much can be installed.  It’s just a pitty that we can’t more easily select how and where things go when they go into these.

    Thanx.

    Gailand.

  63. Tim Drozinski says:

    > If people were to say, "Nothing is working, so I looked at the memory guage

    > saw that all memory was in use, and came here to ask about it" I’d say,

    > "Wow, there’s a big issue here we need to deal with."

    Well, here’s a big issue you need to deal with.  I’ve had my Treo 700w for about three weeks now.  On several occasions, the phone has completely locked up – the flashing power LED indicated that the device is powered on, but there is no response whatsoever to any keypresses.  Only a reset fixes it.  Since then, I’ve been watching memory and running applications.  In my experience, I see a few different things happening:

    * I look at "Running Programs" to discover that ActiveSync is running… even though I am sure I haven’t synced the device, and that I have ended the ActiveSync program since the last time I did a sync.  Why does ActiveSync start running (and consuming resources) if I’m not syncing the device?

    * Since the first time it’s happened, I know the subsequent lockups have happened when lots of programs are left running in memory.  Over the last week or so, I’ve made sure to frequently go into the Running Programs screen and terminate all running processes, especially before leaving the phone unused for a long period, like overnight.  I haven’t had any lockups.

    * What I -have- noticed, though, is that the available memory continues to decline steadily the longer I use the device, even though I am conscientiously ending all running programs after each use of the phone (and don’t forget that ActiveSync seems to inexplicably end up in the running program list even if I haven’t synced in a couple of days, and just ended all programs an hour ago).  After a fresh reset, I will have about 14MB of free memory.  Within a few hours, this will be under 10MB.  This morning I had 9.79MB of free memory, and this afternoon I have 7.37MB free with no running programs (and just had to terminate ActiveSync when I pulled out my phone to check – there was a little over 8.0MB a half hour ago before I found this site and started reading).  By tomorrow, I fully expect the pattern I’ve observed to bear out, and short of resetting the phone this evening, I will see that memory disappear until, at some point tomorrow or the next day, I’ll pull out my phone to use it, and it won’t turn on until I reset it.

    Now, I’m not an exalted Microsoft software engineer, but I know what a memory leak is, and this is one.

  64. MikeCal says:

    Tim, thanks for the report.  I’d like to dig in farther, and need some more information.

    Can you tell me how you’re exiting Active Sync?  Are you going to the memory control panel and doing "Stop All" or are you doing something else?

    Can you tell me what you do with the device during the time the leak is happening?  What programs are you running?  What kinds of things are happening?  Are you using a bluetooth headset to make calls?  Are you getting a lot of meeting requests?  I assume you’re not reading email, since you’re not syncing.  Or are you reading email that you’re getting from some other source?  Etc.

    Active sync has two parts.  The first runs whenever you plug the device into your desktop’s USB port.  The second happens whenever the device syncs over the air.  You can invoke that by going to email and saying "send/receive."  Active sync can also be configured to sync every time a new mail arrives on your exchange server, or every so many minutes.  If you have it configured to do either of those things, it will start itself.  If you go to Active Sync and do Menu->Schedule you can see those settings.  

    Mike

  65. Tim Drozinski says:

    Yes, when I exit ActiveSync, it’s with a "Stop All" on the Running Programs screen.

    I do have my phone set to dial up and retrieve e-mail from a POP3 account every 30 minutes, so that explains why it always seems to be running even after I terminate it… but why doesn’t it shut itself down after the phone disconnects and there’s no more syncing to be done?  That would seem to be the obvious thing to do.

    Thanks for the feedback and responses… I love this phone, and don’t want to be disappointed with it, but it’s hard not to be a little disappointed when you’re expecting a phone call that never comes, and then you discover it’s because the phone decided to lock up without warning and you had no reason to expect it to do that.  It’s just kind of alarming to think that there isn’t a sort of "steady state" where, all other things being equal, the amount of memory in use and free should be roughly the same at any given time if the phone is in basically the same condition (in terms of running programs).  For instance, when the phone boots up, it has about 14MB free memory.  Usually as soon as I open up a few programs, even if I close them completely, I get nowhere near that 14MB free.  Then if I open some more apps and close them completely, I have even less memory.  And less and less each time.  I’ve seen this phone with 4MB of free memory, and no running programs.  That just doesn’t make sense other than to say that either there is a memory leak.

  66. MikeCal says:

    Hi Tim,

    I’ve spent the evening syncing and killing active sync repeatedly.  It does appear that ActiveSync behaves badly when you tell it to close.  Thanks for this detailed report!  We’ll investigate and get to the bottom of this.

    In the mean time, it doesn’t appear to be leaking when I leave it running.  If you don’t repeatedly kill AS, do you see the memory usage continuously growing?  

    As for why we didn’t catch this, I’m sure the more colorful posters here will jump in and scream in all caps that it’s because we suck.  Whether or not that’s true, the fact is that we never turn off Active Sync.  Typical MS employees get hundreds of emails a day, and we use ActiveSync to get them all.  It would never have occurred to us to be going in and repeatedly killing it.  If we did that, our devices wouldn’t always be up to date, which we rely on heavilly.

    I have heard reports of the Treo not waking up from sleep, but I don’t see that behavior on mine.  Can you tell me more about how you got into the "won’t wake up" situation?  Was it that you used the device normally for a while, and it didn’t wake up, so you started dilligently closing programs?  Or was it that you were hitting "Stop All" from the start?  If the latter, can you reset, use the device for a week without ever opening the memory control panel, and then report back how it went?

    Mike

  67. Tim Drozinski says:

    Memory usage is still growing for me, but only slightly.  No material changes in the way I use the phone, and currently the phone shows 7.15MB free memory, down from 7.37MB yesterday, which is slower growth than I would have expected based on past experience, so it’s probably a negligible amount.

    As for the "won’t wake up" condition, the first event happened exactly 1 week after I got the phone.  I left the phone to charge overnight (there were probably programs running in memory at that time, because I wasn’t concerned with killing them at that point), and when I went to use the phone the next morning, the phone was completely non-responsive.  That is, there was a black screen, and no amount of keypresses would change the state of the phone, barring a reset.  Once I did the reset, the phone came back to life (after booting, of course) and was back to roughly 14MB free memory.  It happened once or twice more within the next week – one of those times was in the middle of the day when I pulled the phone out to make a call and discovered that it was locked up – before I began to become paranoid and started closing apps frequently.  Since then it happened one more time, a few days ago, and that may have been one time where I hadn’t closed out apps prior to putting the phone to sleep between uses.

    I’m going to go ahead and reboot now, and try to ignore the memory panel for as long as possible, and see if I can get a lockup to happen for you.

  68. Tim Drozinski says:

    Well, that didn’t take very long.  Found it locked up this morning.  The only thing of any significance I did yesterday was to do a hotsync using the USB cable, mainly to sync Pocket Quicken, I don’t think there were any other changes out of sync since I don’t sync to any kind of calendaring application or Outlook, and didn’t make any media file changes on my SD card.  I didn’t look at the memory panel or shut any apps down other than by X-ing them out or using the OK button to exit them (which, in my experience, typically leaves those programs running in memory).  The last time I used the phone was around 8pm last night, put it on the charger, and picked it up at 7am this morning to find that it woudln’t wake up.

  69. MikeCal says:

    Thanks for these reports, Tim.  I’m going to send them to Palm and see if they’re looking into such issues.  

    It’s hard to determine if small changes in RAM usage are problems or not.  We purposely leave things running because we want it to be fast when you "start" them again, and because empty RAM is nothing but a drain on your battery.  Might as well use it.  However, we do shut apps down when we start getting low.

    That said, I’m pretty sure that the "Shut Down Active Sync" thing you found is a leak (if it walks like a leak, and quacks like a leak…) and I’ve got the right people looking into it now.  

    Mike

  70. Tim Drozinski says:

    Glad to be of help, I hope sharing my information can lead to updates that ultimately make everyone a lot happier.

  71. Tim Drozinski says:

    I should point out that I was searching around for other information about the ActiveSync thing, and found a solution that might help others who have a similar usage profile to mine (that is, are not heavy users of ActiveSync and don’t want it running all the time, only when you’re actually connecting to a PC to sync):

    1. Start -> Programs

    2. ActiveSync

    3. Menu -> Add Server Source…

    4. Enter "fake" in Server address field, and hit Next

    5. Enter "fake" in User Name, Password and Domain fields and hit Next

    6. Uncheck everything on the next screen and hit Finish

    7. Menu -> Schedule (this option was previously greyed out and unavailable)

    8. Change the Peak times and Off-peak times drop-downs to "Manually" and hit OK

    9. Menu -> Options

    10. Highlight the Bogus Exchange Server entry we created in steps 1-6 and hit Delete.  Hit YES when the warning dialog pops up.

    At this point you should have only the "Windows PC" object in ActiveSync, and your device is set up to only sync when cradled.  Since I found this hack and used it, I haven’t had a single instance where ActiveSync has been running unexpectedly.

  72. CpDbob says:

    Mike, I’ve studied memory-related blogs and still need some clarification.

    Your Statement:

    Memory leaks appear when you close a process in an abnormal way.

    Ok, let me see. I use HandySwitcher 2.5. When I choose "close application" it tries to do in in a normal way. In case it fails the warning box is displayed and user can choose either to close the application not responding with process terminating or leave it on its own.

    Even closing everything in a normal way can’t return all the memory allocated. But this process differs from model to model. For example Qtek 9100 with the latest ROM functions properly, while Dell Axim X51v with A06 ROM leaks memoty from 28 MB to 3 MBs, and system has to close all applications not freeing memory. These devices use the same software: pRSSreader stores pages on storage card and uses IE+SPB pocket plus as external browser. Newsland software (something like AvantGO idea), haali reader (txtfb2 bookreader), TCPMP playing music are used together. I switch between these applications and have to do soft reset once a day because of memory leaks – can’t open these 4 applications, suffer from slowdowns. Only Dell Axim X51v, not Qtek 9100. Seems strange.

    But I can’t consider this issue to be caused by HandySwither. Let’s try to turn bluetooth on anΠ² off – you’ll see that memory is leaked – especially with Broadcom stack, but both Broadcom and Microsoft. How can you explain this? I use preinstalled interface actions, not third-party software.

    P.S. AS trick as described one post above doesn’t cure AS on X51v from appearing in task list every 5-15 minutes.

  73. Benjamin says:

    I just happened to run across this Blog when searching for Memory Leaks in WM5.  I work for a GIS Consulting Firm that deals alot in Mobile GIS.  Recently we have been getting alot of issues with units that are running slow or locking up completely that are running WM5. From this forum I have noticed several others that are having issues similiar to me. Quite a few of the post tend to point out Active Sync as being the issue.  I saw the potential "Hack" from a few post above however I don’t believe this will be a solution to all our clients being that some receive email updates via Microsft Exchange, ect … Has anyone heard or found a fix for this issue by chance.  We mostly resale Trimble devices such as GeoXT’s and GeoXH’s and have downloaded the latest version of the OS they offer with no resolve. Any input towards this matter would be helpful.

    Thanks

  74. Martin says:

    A few of us have noticed that the speed of WM5 seems to be fine after soft reset, but then diminishes after a power off/on.  It appears that the speed gets scaled down.  Is this an issue of memory writing, or something different?

  75. MikeCal says:

    CpDbob,

    One of the things that CE doesn’t do as well as XP is forcibly return all memory and system resources that are in use by an application when that application is terminated.  If an application leaks, we do what we can to recover, but we don’t do a great job of it.  It’s not that we’re incapable of writing code that would do this.  It’s that our OS has to fit in much less space than XP does, so it can’t have all of the features that XP does.

    It sounds like you’re asking me why all these 3rd party programs (none of the ones you mentioned are written by Microsoft) leak when they’re shut down.  Are you asking me to try to convince them to change their code?  I have a lot more ability to fix Microsoft programs than ones written by other companies.  

    Mike

  76. SHAFIQUE says:

    Hi Mike,

    Interesting blog. I found it as I was looking for a solution on the net for my Jasjar which has a memory leak problem. When I dos a soft reset I have about 27 Mbyte of ram. With use of applications and closing it once done the ram does not return to the original 27Mbytes unless I do a soft reset. It windles down untilI cannot run any software and the device just freezes at which point I have have to do another soft reset. Sometimes up to 10 a day depending on the amount of usage. It is very frustrating in spite of all the excellent features this device has. Two questions:

    * is there any way to solve this issue or free up the memory

    * will any of the future OS updates adress this very REAL problem

    Just to inform u that I am a pharmacist and one of the apps I use concerns medication protocols in a life/death situation (doses, drugs, instructions, side effects etc.) If there is a code in the hospital the pharmacist has to responds with meds and I use my Jasjar as a reference for any questions the physicians may have. As u can appreciate I cannot afford that my Jasjar freezes in these critical situations. However, it has happened and then I have to do a soft reset which takes time and seconds are of the essence in this situation. If u can help please respond

    Thanx

    Shafique

  77. MikeCal says:

    Shafique, do you know which application is leaking?  Tim helped me find a leak in ActiveSync that comes from repeatedly killing it from the Memory control panel.  I’ve reported that problem to the right people.  Until a fix is available, though, the best solution is to not forcibly shut down ActiveSync.  If there is another application that is leaking, I’d love to know about it.  

    Note, however, that I really only have pull with applications we wrote.  If a 3rd party application is leaking, I don’t have much ability to tell that ISV to fix it.  Since I’m not the ISV’s customer, they’ve got no reason to listen to me.  

    That said, if the leak is coming from us, we want to know about and fix it.

    Now, I recognize that leaks are a very bad thing, and yes, we’re working to fix them.  But if a memory leak on your device could literally kill someone, then I’m going to suggest a program that resets the device every night.  Yes, it’s a hack, and yes, it’s a bad hack, but it’s worth it if the stakes are life and death.

    Check out my Nightly program linked from this entry: http://blogs.msdn.com/windowsmobile/archive/2006/01/11/511660.aspx

    It’s a program I wrote to shut down my smartphone every night (I don’t want phone calls after I go to bed, so I figure why burn the battery power.)  The shutdown part doesn’t work on a PocketPC (they don’t do full shutdowns) but it also has the ability to reset the device.  

    No, folks, I’m not saying that you need to reset your PocketPCs nightly to make them functional.  I’m just offering this as an option for an extreme case like Shafique’s.  And Shafique, I’m not saying that Nightly is guaranteed to work.  It’s just something I wrote in my off time.  Don’t sue me if it fails to shut down your device some day.  But, if it can help you, you’re welcome to use it.

    Mike

  78. Mike S. says:

    Mike,

      I was wondering if you knew anything about the possibility of upgrading (increasing) the amount of RAM in the Treo 700w. I realize that this is not actually a Microsoft problem, but I bought the device because it was Windows Mobile, and I am constantly running out of memory (sometimes with only IE running). 32MB of RAM is just a silly thing to do to a guy in 2006, especially when with *nothing* running, I have less than 10MB of that free. (if there’s a memory leak, that I would call Microsoft’s problem — but for the moment I’m assuming there just isn’t sufficient RAM).

    So the question is, can I extrapolate what I know about desktops to the mobile device? If I took out the battery (or somehow managed to turn the device "really" off), and somehow opened it up, would I find a SDRAM (or something similar) in there? Could I remove that chip and put in a 64 or 128mb one? And then, starting up the unit, would it then recognize that?

    I am directing this problem at Verizon and Palm as well, but I think you’d give me a better answer (since Verizon keeps referring to ROM as "memory" and Palm doesn’t monitor their forums).

    Thank you much!

    Mike S.

  79. MikeCal says:

    Mike S, there are two technical issues to contend with regarding putting more RAM in.

    1) Hardware.  Phones don’t typically have RAM cards that can be easilly removed.  They’re often soldiered in.  There’s a lot of space in a PC for connectors and clips and such, but phones are much more constrained.  I don’t know the specifics of the Treo implementation, so I can’t tell you for sure.  But I’d be surprised if there’s an easy way to get the RAM module out.

    2) Software.  Because it’s so hard to change the amount of RAM on a phone, the phone software will usually be written to assume how much is there.  So, even if you were to put more in, the software wouldn’t know to use it.  

    There have been third party companies who upgraded PPC memory in the past.  In general, though, they’ve always worked on devices where the OEM released multiple versions of the same device with differing amounts of RAM.  When an OEM does that, he typically writes his software to calculate how much RAM is there.  That way he can use the same code for the different SKUs.  

    Again, I don’t know the specifics of what Palm did for the 700w, but, I wouldn’t have expected them to make their code figure out how much RAM is there.  

    Mike

  80. Tim Drozinski says:

    Reminds me of the early 80s, when Bill told the world, "64K ought to be enough for anyone."  πŸ™‚

    Upgrading the memory was one of the first things I thought of when I realized how memory-poor my Treo 700w really is, but I guess I’m just going to have to limp along for a year or two until they release a new Treo with considerably expanded on-board memory (hopefully the OS at that time won’t just bloat to consume the added memory).  It’s just a shame that there’s nothing that can be done in the interim.  I can add storage through the SD slot, it’s a shame I can’t expand usable memory in a similar way.  I realize the architecture of the SD memory and the ROM/RAM in the phone are radically different, but I think we live in an age where it’s obvious that capability is drastically outpacing hardware.  Pretty much everyone understands that the device (like a computer or phone) you buy today will be antiquated in 6 months.  Not that it can’t continue to perform the functions it was designed for, but that soon after that device hits the market, there will be a newer/faster/bigger version, which means that all the apps for that device will be tailored for those parameters, and you find yourself, for lack of a way of just adding the additional memory or faster CPU or what have you, unable to keep up with the Joneses.  Short of throwing away your expensive but obsolete device and buying yet another expensive and soon-to-be-obsolete device.  It ought to be common sense to try and make these devices as expandable as possible.  I’d gladly deal with having a phone that’s a few cubic inches larger (longer, wider, thicker, whatever it needs to be) in size, if it means that 6 months from now I can add a memory chip if I need to, or add other expansions as necessary.

    I realize, though, that the industry, especially the cell phone industry, relies on this heavy turnover, planned obsolescence and conspicuous consumption to drive their bottom line.  They don’t want someone to buy a phone and keep it for 10 years – they want them to always want the newer/better/faster model so that people will buy a new phone every 6-12 months and keep the revenue coming in.

  81. MikeCal says:

    Tim, I understand what you’re saying.  Being in a rapidly changing industry is both exciting and frustrating.  Note, however, that the cell phone industry isn’t driven by heavy turnover, planned obsolescence, and conspicuous consumption.  The mobile operators heavilly subsidize hardware sales (they sell the phones at a loss and hope to make it up in subscriptions).  The MOs would do better financially if you would use their service for 10 years while only buying one phone from them.  Microsoft as well would love to have a stabilized platform we could sell services on.  You’d be shocked to learn how little we make per phone sold.  

    Phones aren’t changing rapidly because we want you to have to buy new devices all the time.  Phones are changing rapidly because the technology is improving at such an astounding rate that we need to struggle to keep up with it.  

    Not long ago, you were lucky if your phone’s data connection could keep up with your old 56K modem.  These days we’re starting to see DSL speeds.  Not long ago, you were lucky if your PDA lasted 8 hours.  Now they go 200.  Not long ago, you were lucky if your phone fit in your hand.  Now you don’t think twice before putting it into a tight jeans pocket.  

    No one said, "Hey, let’s release a slow brick today so that we can force people to buy a better device tomorrow."  People made the best devices they could with the technology available to them.  That technology is changing so rapidly that next year’s phone will be substantially better than this year’s.  Frustrating if you paid a lot of money for last year’s phone, but exciting if you want to see these devices continue to advance.  Imagine the alternative, where your phone is never out of date, but is also not improving.

    Regarding user expandable memory, imagine if your Treo was twice as thick as it currently is.  Would you REALLY think it’s a compelling device then?  Or, take a memory SIMM from a standard computer and set it next to a Moto Q.  Now imagine what you’d have to do to the device to fit that in.  Then, put yourself in the typical user’s shoes.  If the device was going to be that much bigger, would he rather be able to update the RAM (something that only a tiny percentage of PC users do) or double the battery size and have the device last longer between charges?

    We get very consistent feedback. "Make it thinner", "make it smaller", and "make the batteries last longer".  Like it or not, phone manufacturers are trying to make a living at this.  And they can’t do that by making an oversized phone that few people would buy.  

    As for the BillG quote, that’s urban folklore.  I don’t think there’s any company in the world that has relied on Moore’s law more than Microsoft has.  

    Mike

  82. Tim Drozinski says:

    >> Note, however, that the cell phone industry isn’t driven by heavy turnover, planned obsolescence, and conspicuous consumption.  The mobile operators heavilly subsidize hardware sales (they sell the phones at a loss and hope to make it up in subscriptions).

    >> Phones aren’t changing rapidly because we want you to have to buy new devices all the time.

    Not buying it.  Sure, the services subsidize the sales of the hardware, but at the same time they rope you into a new long-term contract in order for you to get those subsidies.  When I bought my 700w, I paid about $400 and that was with $200 in rebates and discounts from Verizon.  Sure, I could have chosen month-to-month service and paid $600 for the phone… and paid quite a bit more per month in service charges as well.  And the same is true when I want to upgrade this phone – I can pay full price for the next phone and stay on my current contract, or they’ll give me a few hundred bucks off the next phone in exchange for locking into another 2-3 year contract.  They WANT that to happen – that’s why they’re willing to use the hardware as a loss leader.  They will always give up $100 on the phone when they stand to make $300 back on the contract.  If they can convince you to buy another phone a year into the cnotract, renew your contract and add the additional services like text messaging or unlimited internet for added bucks, they come out even further ahead.

    Bottom line is, these companies aren’t stupid, and they aren’t in business to lose money.  They may be taking marginal losses on the hardware, but they’re MORE than making up for those losses.  I suppose that sucks for you since you’re selling the phone to them and they’re making the money off the back end of the deal.  Say you (as a manufacturer of cell phones) sell them the phone for $100.  They turn around and sell it to me for $50, but in the process lock me into a contract that guarantees they’ll pull in $200 in profit… they’ve more than covered the cost of the phone, and you don’t see a dime of it as the provider of the phone.  What can you do?  You can price your phone right out of the market, or you can make your cut and live with it… sour grapes won’t help you.

    >> Phones are changing rapidly because the technology is improving at such an astounding rate that we need to struggle to keep up with it.  

    I remember when, as you say, cell phones were "bricks."  The fact that they were large, cumbersome and had a small feature set didn’t stop people from buying them.  I would reather have a larger phone that I can modify and upgrade than a tiny phone that can only ever be replaced.  I appreciate that this is an area of technology that is still a bit behind the curve, but as big of a market as there is, I have a hard time believing your that far behind the crest of the wave that no one anticipated that 32MB(really, more like 10MB once the operating system is up and running) would be inadequate, or that someone might be willing to pay to either have the capability of snapping in a new memory module themselves, or even ship it off to a service center for a factory upgrade.

    I guess what I’m saying is, maybe you have an excuse this time… when the next generation of phones comes out, and they’re not expandable either, what will your excuse be then?  Why can I add a SD memory card or wifi adapter, but not upgrade the actual performance of the phone, if not for the fact that you will eventually need me to buy the NEXT phone.  See, that’s why it’s planned obsolescence – if you really wanted me to keep this phone for 10 years, you’d be putting yourself out of the market even if I paid full price for the phone, because you’ll have a new phone in a year, and no one will buy it because the phone they have is still adequate.  This phone has 32MB.  The next phone will have 64MB which will only be good until we realize that after the new operating system takes its slice and the applications use more since more is available, we’re in the same boat.  Then the next has 128MB, with corresponding increases in how the system uses it.  It’s not that it’ll be all bloat – I’m sure much of it will be new or additional features, probably ones that customers demanded.  The point is that at the end of the day, the free resources available to the user are in about the same proportion that wasn’t acceptable in the previous generation.  It’d be nice if it were up to the consumer how much resources they feel they need, not you.  Maybe a lot of users can get by with the way they use the phone… but then there are also power users who could and would take advantage of the ability to add more memory, or a faster processor, or more than one SD card at a time.  Shouldn’t the user get to decide what’s right for them, since they know what it is they’re trying to accomplish?

    I suppose your answer will be, if you need that much power from your phone, you really need to have a separate device.  I’d call that a cop-out.

    >> No one said, "Hey, let’s release a slow brick today so that we can force people to buy a better device tomorrow."

    That’s not what I said.  Even you, with your allusion to Moore’s Law have it right – it’s a FACT that technology is progressing.  You KNOW that the product you deliver today will be obsolete in 6 months.  The question is what do you do about it?  Do you deliver a product that can be upgraded in 6 months, or do you say "Don’t worry about it, the new features are bound to be so compelling as to ensure that people will throw away this device and rush out to buy the new one?"  My contention is that from everything I can see in the industry right now, there are basically no expandable phones, which means that the manufacturers are relying on churn (some of it may be driven by customer demands, to be sure, but it’s not like Motorola is saying "No, we won’t compromise – our current design is good enough, so we’re going to keep making this same exact phone for two more years") to keep their business going.  It doesn’t matter if the manufacturers are saying "we’ll make the next phone even smaller so that people will HAVE to have it" or if customers are saying "if you make a smaller one, I will buy that one too" – it’s a FACT that people routinely buy new phones, not because they need a new phone, but because of some feature they feel they can’t live without, even if their current phone is perfectly serviceable.  It’s even more ridiculous when the "feature" isn’t even a feature, like a thinner phone.  That’s not to say that making the phone thinner is trivial, I’m saying that it’s of dubious benefit, purely cosmetic.  If you were buying it because it was thinner and twice as powerful, that would be something… but buying the same phone in a thinner package?  Is that really necessary?  And do the manufacturers care, as long as people buy them?

    All this aside, do you know anything about the Palm 1.10 firmware update and how it interacts with WM5.0?  I updated the firmware last week from 1.02 to 1.10, and it seems like some of the "features" are not really all that desirable.  Memory management does seem to be slightly better, though it looks like my ActiveSync issue is back, where it keeps launching ActiveSync.  I guess the update blew away some registry entries.  Battery life is about 50% of what it was previously, mainly because it looks like the phone tries to keep the internet connection up all the time.  It also seems like the phone is never off, it just dims the screen (probably because the internet connection is active and polling).  I’ve been looking around this morning for anyone with suggestions on how to cope, but can’t seem to find anything useful.

  83. MikeCal says:

    Tim, I think we’re going to have to agree to disagree on this.  However, I will say that, to a huge percentage of the phone buying public, thinner is the most important "feature" a new phone can offer.  The Moto RAZR is one of the hottest selling phones around.  The next time you see someone using one, ask him if he bought it because of the performance of the software.  Odds are he’ll look at you blankly and say, "Didn’t you see how thin it is?"

    If there were enough people willing to buy a large but expandable device, someone would build one.  Our software already supports what you want.  No one builds hardware like that, though, because the market for large expandable devices is too small to justify the hardware development expense.

    Regarding the firmware update, sorry, I don’t personally know about it.  I tend to live a bit further up the hardware curve (I’m usually running upcoming hardware/software prototypes) and don’t always know the details of what’s on the market at the moment.  

    I will say, though, that if you press the power button (the end key on the Treo) the screen should shut off regardless of what’s happening with the net connection.  If pressing the power button just dims the screen but leaves it on, something is wrong.

    Mike

  84. Tim Drozinski says:

    >> However, I will say that, to a huge percentage of the phone buying public, thinner is the most important "feature" a new phone can offer.  The Moto RAZR is one of the hottest selling phones around.  The next time you see someone using one, ask him if he bought it because of the performance of the software.  Odds are he’ll look at you blankly and say, "Didn’t you see how thin it is?"

    And I think you agree with me, though, that "thin" is not really a "feature."  It’s a fact of life that things have been getting smaller for 60 years or more.  Cars, radios, TVs, computers… it’s a reasonable expectation that the next generation of any consumer device will be either smaller, considerably more powerful or both.  It may be a highly-demanded quality of cell phones that the next model is smaller, but smaller doesn’t change the capability of the phone.  If all a cell phone did was place and receive calls, I don’t think you’d see the volume of cell phone hardware sales that currently exists, mainly because "getting a smaller phone" would not be a big enough driver for people to shell out a few hundred bucks.  It may be one of the key reasons why particular models sell well compared to others (smaller form factor than a competing model with similar features), but if you took away all the other features that have been added in the last couple of years, there is nothing really compelling about a smaller form factor.  Heck, I remember my first cell phone – its big draw was that it had caller ID, and there wasn’t even a phone book to store numbers.  My next phone had a 10-number phone book, and the one after that had a phone book that would hold a couple hundred names and numbers, and you could play Snakes on the 120-pixel LCD screen.  More recently I could store multiple pieces of information about a single contact, like their home, cell and work numbers.  Now on my Treo I can store a ton of information about a single contact – name, company, a multitude of phone and fax numbers and e-mail addresses, physical address, birthday, spouse’s name… That’s one of the reasons why I upgrade my phone – I wanted more than a phone, I wanted a true PDA that also worked as a phone.

    Sure, there are plenty of people for whom a phone is merely a fashion accessory, and the features aren’t necessarily as important  – but that doesn’t change the fact that they contribute to a high rate of sales of cell phone devices, or that those people aren’t also buying a phone for other features.

    >> If there were enough people willing to buy a large but expandable device, someone would build one… No one builds hardware like that, though, because the market for large expandable devices is too small to justify the hardware development expense.

    There isn’t a market?  You’d better tell your management that… I’m sure they’d be interested to know that in your opinion their whole plan for the UMPC is a dead market.  Didn’t they just blow a huge wad of cash marketing devices (or more to the point, the OS for third-party devices) that fit that description?

    I think, if anything, that is the way the market will really go in the next 10 years: slightly larger devices with more utility (due to more screen real estate to function as a useful browser) with multiple functions – computer, PDA, phone, GPS, you name it.  And I believe that these devices will be expandable in various ways.  I think the devices will HAVE to get a little bigger, because right now, even then largest smartphones don’t have adequately large screens to make them desirable as high-use internet access points.  I use the browser on my Treo extensively, but I’ll be the first to say that 240×240 makes for a pretty poor browsing experience.  It’s the chief complaint I get from anyone I talk to about the phone as well – "the screen’s too small to be of any real use."  That and the fact that the IE browser framework is ancient technology and Mozilla’s Minimo browser barely crawls at a 2-seconds-per-keystroke rate of performance.  If I could have a device with a slightly larger screen and a full-featured browser capable of handling JavaScript and plugins like Flash, I’d probably almost never use my PC for surfing the web.

    >> Regarding the firmware update, sorry, I don’t personally know about it.

    I thought it was a stretch, but I figured it couldn’t hurt to ask.  I wasn’t sure how tightly intertwined the phone firmware and the OS would be, or to what extent your two companies would be cooperating on it.

    My problem with the screen dimming is that I can turn the phone off, but now because of the push capability included in the patch, I think the phone is starting up to fire the internet connection, then idles but for some reason isn’t powering back down – it hits the interval to dim the screen due to inactivity, but it’s almost like some program, ActiveSync or maybe just the e-mail client, is keeping focus and fooling the phone into thinking it’s still in use.  In my experience, I see four states for the screen:

    1) ON – the screen is fully backlit

    2) DIM – after a minute (or whatever timeout I have set) the screen dims to a lower backlit setting

    3) No backlight – I can still see everything on the screen, but there is no backlighting at all until I press a key

    4) OFF – black screen, I assume the OS is in a "hibernate" or low-consumption mode where only the absolute core functionality is running

    The problem since the firmware upgrade is that it seems like the phone progresses from ON to DIM to No backlight, but never goes to OFF.  And even if I do manually turn it off, I can pick up the phone an hour later and see that it’s in the "No backlight" mode, which would imply that it turned itself back on at some time.  Unfortunately, I’ve found Verizon’s Treo 700w troubleshooting site to be fairly uninformative for more advanced questions and problems.  It seems like the "broadband access" icon at the top of the screen always reverts back to the "connected" state within a minute of manually disconnecting, which implies to me that something is reopening that connection, and I would guess it has to do with the push features.

  85. MikeCal says:

    UMPC is a fine product that is in a completely different market than mine.  They’re a different division and I haven’t spoken personally with them, but I’m pretty sure they don’t think you’re going to replace your cell phone with one.  Cell phones are devices you carry with you almost all the time.  UMPCs are too big for that.  What makes sense for UMPCs doesn’t necessarily make sense for cell phones.

    Regarding the issues you’re having with your Treo, it shouldn’t behave the way you’re describing.  Do you have any extra installed apps on it or anything like that?  When the device turns on to receive email, it keeps the screen off.  Case 3 in your example (No backlight but device on) I’ve never seen on a Treo.  There have been devices where pressing and holding the power button turns the backlight off, but the Treo isn’t one of them (pressing and holding it’s power button shuts off the radio).

    Mike

  86. Jan says:

    Need some advice on the Treo 700w …

    When I have several applications running it chokes and I have to turn them of in the memory window … sometimes even soft reset.

    I see how much ram I am using and I am definetly getting pretty close to the available limit for programs, but since I have a storage card I don’t really need much internal storage.

    In hopes to be able to change the allocation for the memory at hand I downloaded Memmaid to reclaim some of the storage assigned memory for my software — to find that this wonderful allocation slider in memmaid doesn’t let itself change in my phone.

    Any ideas what I need to do, or is this a known thing? I upgraded to 1.10 — good? bad?

    I have been trying to read up on all your posts but I haven’t found anything I could make use of.

    Thanks,

    Jan

  87. Tim Drozinski says:

    >> Regarding the issues you’re having with your Treo, it shouldn’t behave the way you’re describing.  Do you have any extra installed apps on it or anything like that?

    I have the following installed (this is what appears in the Remove Programs menu):

    LandWare Pocket Quicken 2.1

    Palm UpdInfo

    June Fabrics PdaNet

    TCPMP The Core Pocket Media Player

    With the exception of the Palm UpdInfo program (which I’m not entirely sure what it is), I don’t think any of them have anything to do with keeping the wireless connection open or keeping the screen active but dimmed.

  88. Tim Drozinski says:

    Out of frustration I decided to do a hard reset last night.  I’m still putting things back the way they were (the last straw was ActiveSync suddenly deciding not to recognize the device when I put it on the cradle to sync), but I have to say that I seem to have considerably less power drain today.  After three hours of idle time (off the charger but not heavily used) I’m still at 89% battery.  Yesterday I would expect to have been at about 75% battery under the same conditions.

    I’ve reinstalled Pocket Quicken and PdaNet.  I don’t see the Palm UpdInfo program in the Remove list any more.  But I do still see that the phone is connecting the Internet connection within minutes of me shutting it down, presumably to poll for mail, even though I don’t have it set to sync to an Outlook server (the only e-mail I get is from a POP server, and I have that set to retrieve every 30 minutes – the connections are far more frequent than 30 minutes apart).  At least it seems to be powering down the phone after the one minute inactivity timeout again… I’m not seeing the unlit screen.

    So I suppose there was something in there that I either had installed or possibly installed and removed at some point that was gumming up the works.  I’m not thrilled about having to rebuild my contacts (since I don’t sync with Outlook, and since I couldn’t get it connected to ActiveSync to install and run Palm’s backup utility, I lost my contacts and calendar entries during the memwipe).

  89. MikeCal says:

    Tim, I’m sorry to hear that you had to cold boot your device.  I’m glad to hear its working better now, though.  

    Mike

  90. Tim Drozinski says:

    Well, on day two since the hard reset, and I have to say things are still looking good.  Battery drain is minimal, maybe 15-20% throughout the whole day at work.  The screen powers off properly (I think this was the major factor in my drastic battery drain prior to the reset).  I find that the phone almost always reconnects the internet connection within minutes, despite the fact that I have it set to poll for POP e-mail every 30 minutes.  It would be nice if there was a state check, so that before connecting to poll for e-mail, it would set a flag for the internet connection state.  If the internet was already connected, stay connected after checking the mail.  If the internet was not connected, then it should terminate the internet connection after it’s finished with it. I have an unlimited data plan, but I shudder to think what might be slowly trickling across that connection for someone who has a per-megabyte plan.

  91. JimH says:

    The patriot missle systems have to reboot every couple of days, why wouldn’t a hand held computer?

    My question is: why do I have to reboot every time I open a word document. I’ve tried it with 10 different documents. They just don’t close. I’ve waited up to 5 minutes.

  92. MikeCal says:

    I certainly can open and close word documents on my devices.  What device are you using with which version of the OS?

    Mike

  93. chong says:

    Hi guy,

    I believe MS do all their work to prevent what happens while designing the platform, but they don’t have control over OEM products. The real memory eater is the OEM, of cause we all are human ,where bug do exist no matter how error prone we want it to be.

    what we do concern is, the product we brought actually have what it claim in the spec. If they said it have 64RAM and 128ROM and not faking it by where physical device actually have 64ROM and 32ram,yet still display system said that it have 64ram and 128rom and that is a still ok. I believe this is the reason why we need to know even the memory not able to use by us is show in the panel. So that we know we not cheated by OEM.

  94. MikeCal says:

    If you don’t trust what the OEM is telling you, it’s going to be hard to believe much of anything.  Someone could easilly write a memory app that reports complete lies that make it look like your device has 10 times the RAM it really has.  There’s some point where you have to trust that the OEM is telling the truth.  Or, you can trust that, if they weren’t, someone would figure it out and file a class action lawsuit.  

    Something more practical than involving lawyers, though, is this.  RAM and ROM will almost always come in powers of 2.  You’ll see RAM and ROM come in 32M, 64M, and 128M, but almost never numbers in between.  In general, it would cost the OEM more to put in 48M than 64M.  This is because 64M is one set of chips, where 48 would need to be done with a set for 32 + a set for 16.

    For this reason, if the RAM is reported as 64M and you can account for more than 32M, then you can be pretty confident that it really has 64M.  

    Mike

  95. Jacques Garand says:

    Mike,

    I wahe been using a PPC since 2002.

    I used outlook to sync my contacts with the PPC. Synchronising my 4950 contacts would take about 8 minutes on the first sync, & take 8.3 mb of space in memory.  I tried to do the same in WM5 & the same file takes 1.5 hours to sync & takes 27.8 MB of space in the New WM5 PPC.  Why is that? Why the file is not compress like in Pocket PC 2002 & 2003?

    I have sync the same file on the same day on both machines to verify the results.

    Thanks

  96. mari says:

    Hey, can anyone tell me how to find out mem USED on my Tmo Dash WM5 smartphone? I can see total mem in system info, but not used or free.

    Thanks

  97. Larry says:

    I found this topic when searching for an answer to the obvious memory leak problem. It looks like the thread has become silent and I have to admit I didn’t read it all, I am so sick of sifting through endless drivel to find no real answers, so if there is a solution I missed reading I’ll apologize in advance, but since I just had a talk with hp today and they disavow any knowledge of memory leaks or the need for a patch, I doubt there is a solution posted above this.

    I have an ipaq rx1950. No fancy phone no fancy anything, I don’t synchronize with my pc. I did both rom updates and the device still loses memory, without anything added to it at all. You can see it for yourself. Run anything and shut it down again. Any program, any game anything that comes with it. There will be less ram available, EACH TIME YOU DO IT. Different apps steal different amounts and it doesn’t get collected back to the os for use again. Even the piddly little game solitaire repeatedly leaks 10-90k every time. I’m pissed. All this deflection of responsibility, double talk and crap doesn’t change the fact that there IS a memory leak problem and it ISN’T going away. Clean reset does not fix it. Soft resets do return the missing ram for use but it quickly gets chewed up again and it’s getting tiring to have to repeat it. I saw enough in the posts I DID read to know, I am not the only one to have observed this and there is no semantic game you can play with me to convince me otherwise.

    I was willing to accept the fact that 32MB was all this unit has and that only about 12 of them are free for me to run whatever I want in it, but when I exit a program I expect that same 12MB to be free again. I don’t want to hear that ‘some’ software doesn’t come with an exit feature so that’s why objects are left uncollected when the stop programs page is used; these programs come with the machine. I don’t give a flying f**k who’s responsibility it is, someone should be fixing it for Christ’s sake. All I bought this pda for was to have something portable that could track my sugar readings and food intake, I am a diabetic and I need to have this work right, and not crash wnen the ram is used up and have to reset and lose what I entered because the prog didn’t get to complete the write. I wrote a simple program that does barely more than store text in files on the SD card. I built in an exit so I don’t have to go to stop programs, but I don’t get all my ram back. No program EVER returns all the ram. EVER. I wrote my own program hoping to get around the memory leak problem that notes and word and excel all have, but no, it’s not the programs, it’s the f**king operating system. Are you trying to tell me that the same memory leak error is somehow mysteriously getting into MY program by my doing? HP told me I needed to send the device in for service. I told them they were out of their minds. I used to do tech support for both palm and hp, and at both companies we were told to use that catch-all that when we couldn’t resolve the issue quickly, after handing out the canned responses.

    Please, please fix windows mobile 5 or offer a free upgrade to the next version of windows mobile that doesn’t have this problem, I don’t care what the solution is, just do it.

    On another note, since I have your attention, why, dear God why isn’t there an option in active sync to allow the device to be connected to the pc without synchronizing every 5 f**king minutes and bleeping at me, slowing things down? I don’t sync any data. I use the SD card to transfer data because I hate letting active sync run. Why? It LEAKS RAM. I do my developing, I reset the handheld and go on my merry way. When I write programs and test them I want to sit there without it constantly syncing, I turned off all the conduits and it still connects and syncs and bleeps and pisses me off. I don’t use it for email, I don’t want it and the pc to talk unless I SAY SO. Is it too much to ask?

  98. Larry says:

    And no, I don’t want to disconnect/reconnect every time I want to test the next build.

    If this doesn’t get resolved by the time my warranty expires in two months, I will be purchasing another handheld; and no, it won’t have windows mobile in it.

  99. Paul says:

    I have the same problem – been using my Verizon Treo 700w for nearly a year now, and I have next to nothing 2-5MB available since day one. And the only thing that I have added from the stock config is OneNote…

    HELP!!!

    -Paul

  100. DannyH246 says:

    Hi Mike,

    Just want to start by thanking you for taking the time to do this excellent blog.

    I am using a Symbol MC9090 running Windows Mobile 5.

    I have a number of applications running that perform various tasks, one of which is an executable that is converting GPS Sirf data to NMEA for use in TomTom Navigator. The problem is that when everything is running TomTom reports that it cannot find the GPS device, however if i disable some of the running apps then TomTom finds the GPS device correctly. I am assuming that this occurs due to some kind of resource limit. However i currently do not have enough information to correctly explain what is going on. What tool could you reccomend to correctly diagnose this issue?

    Danial.

  101. Satish says:

    Well, I use iPAQ hw6965. Started with high regards, and i have to say my later feeling was it was a slow "memory-intensive" OS device. My furstration only got worse when i started getting the Bluetooth "lack of memory to load drivers" error (which i found was a common error that no one really has been able to solve). I tried the HP online-support and then the service-center, who did a nice soft-reset (as if i had’nt known of it πŸ™‚ and gave it back).

    I have seen Active Sync (4.1) not freeing up memory after it uses it, also seen the same behavior with PIE. After a soft-reset and having 34mb free (which is great), the device starts loosing out memory to Active Sync and other apps as they start up or you run them. To me it only looks like these apps keep APPLICATION DATA in memory, fine, but don’t really free them up when we close them (even closing from memory manager). That’s bad, and needs some serious thought, some kind of garbage-collector is defenitely needed i suppose.

    And as far as the Bluetooth error is concerned, i figured out the root cause, and have to say, memory did play a role. This happened when ever i started MapKing GPS app, and although i wasn’t using BT, it seemed to try turning it ON when it couldn’t get a location-fix. And since MK would’ve alread taken quite a bit of memory, starting the BT failed, and the BTCETray.exe error started.

    I later configured MK not to look for other GPS devices on COM ports, and it’s ok now(doesn’t start BT on it’s own), but the issues still exists for sure, and waiting to occur. I’m still surprised at this, just howmuch free ram does BT expects to find to startup? 10MB, 20MB? That’s very bad really. Again i’m sure no one will take the blame, it passes between OS, to OEM and ISV. Customer is really the loser. It’s not fair to say "GO LOOK ELSEWHERE if you’re not happy with us".

    I’m pretty happy with the performance now after doing some of these settings, and have no complaints, but just howmuch of these kind of issues are connected to WM5 or to ISV’s or OEM’s is really the question, and what is MS doing on this? At this point looks like everyone is to be blamed.

  102. MikeCal says:

    Blame is a slippery game, but I can tell you who is responsible for the different parts you reported.  

    Active Sync:

    In WM5, ActiveSync leaks memory if you forcibly shut it down.  It was due to people posting here (I can’t remember if it was this entry or another) that caused us to investigate and fix the issue in WM6.  We didn’t catch the problem on our own because we don’t forcibly shut down Active Sync.  We let the OS do our shutdowns for us. I think you’ll find that if you stop forcing AS to shut down, you’ll end up with more RAM to use.  

    BlueTooth:

    Microsoft provides a Bluetooth stack, but for various reasons, HP chooses not to use it.  They instead use a stack from another vendor.  We would very much like for them to use our stack instead, beacuse having two stacks out there makes things difficult for ISVs.  But we can’t force our OEMs to use our stack.  They get to choose how their device should run.

    GPS App:

    The ISV that wrote this app would be responsible for the way it opperates.

    As frustrating as it is for you to hear this, a software developer can only fix code he’s allowed to see.  Microsoft isn’t allowed to see the code from the Bluetooth stack HP uses.  HP probably isn’t allowed to see the MapKing code.  Etc.  Whether it’s blame or finger pointing or just reality, we can only do what we can do.

    This is inherent in our decision to have partners.  As soon as you choose to have partners, you have to allow them to make their own decisions.  If you’re going to make all their decisions for them, then they’re not partners.  They’re vendors.  

    Some of our competitors chose to go that route instead (no partners, just vendors).  That fixes some problems, but brings others.  The pro to going it alone is that the customer has one place to look for all issues.  The con is that the customer isn’t allowed to do things that you didn’t explicitly allow.  For instance, there wouldn’t even BE a MapKing on one of those devices.  So you have to decide for yourself whether you’re better off with a MapKing that has the potential for some problems, but works for you, or none at all.  

    Our choice is that the flexibility of allowing people to do things we didn’t explicitly allow is worth the pain that can come from some of those things not being done perfectly.  With variety comes a range of quality.  But I’d personally rather have options than one choice that doesn’t meet my needs.

    Mike

  103. satish says:

    That’s nice to hear about ASync, but not so happy with the BT Stack, why should HP do that. Can only hope HP releases an update sometime.  I’m sure MS would’ve tightned loose ends in WM 6.0, all the more reason to have it as a user, only not happy to know HP won’t be providing any upgrades to WM6 for it’s HW6900 series. Stuck again.

    Satish

  104. MikeCal says:

    The two BTh stacks are different, and have different pros and cons.  Whenever you’re faced with two choices, you prioritize the pros and cons of each and pick the one that comes out better.  The actual pros and cons are usually pretty cut and dried.  How much RAM the two stacks use or how many profiles they support are just measurable facts.  What makes one person select one and another person select the other is a matter of how they prioritize those pros and cons.  

    Let’s pretend, for a moment, that the only differences in the two stacks were that one used more RAM but had an extra profile.  (It’s a lot more complicated than that, but I’m simplifying.)  Now you might say, "I don’t use that profile, so the RAM usage is the more important difference."  But another person might say, "I can’t live without that profile, and RAM isn’t an issue for me."  

    It’s never a cut and dried, easy choice that works for everyone.  HP has to choose what they think is best for their customers, and the priorities they set on the various pros and cons made the other stack work out better for them.

    Mike

  105. Satish says:

    Yes thanks mike for the BT insight, i understand and that’s usual to have to draw a line between performance and options. But atleast at this point I feel we are getting BIT’s of all world than the BEST of all or rather we have BEST of all, that don’t go well with each other. I mean as a package none of the products seem to work well as a whole, and this with the best OS around, the best CPU’s, best innovators & their products – don’t seem to compliment each other.

    As a end user, bottom line, everything should work.  We are paying nothing less than a BMW in mobile’s/pda’s. Now, i  wouldn’t least consider if my RAM is 10% free or 90% free, if i never saw a BT error complaining of "lack of driver memory". I couldn’t find one soul who said "I can live with that, as long as something else worked".

    The partner-program may be works for MS, so they can say "This is where we get down", but certainly when the OS lands up in one their partners product…well, the usual πŸ™‚

    Personally, i like WM 5, but as usual, it’s the end package that delivers the power and effeciency of the engine at the will of the user where it all starts failing. Hope to see customer in the MS-Partner-Customer value chain. Win-Win-Win i.e., not Win-Win- ah! they can live with it πŸ™‚

  106. Nick Lester says:

    Hello Mike!

    I have the Treo 700w and I was wondering if there could possibly be an update for WM5 that would allow virtual memory by paging it to disk like an SD card?

    Is this remotely possible with the current kernel of WM5?

    Nick

  107. MikeCal says:

    Sorry Nick, but we haven’t implemented anything to allow paging to storage cards in CE.

    Mike

  108. Tomaso says:

    Hello Mike!

    Thank you for making this blog, now I can understand why instead of 64 Mbyte only 45.2 Mbyte of total program memory is displayed on my WM6 device, and I see now why the system uses 22 Mbyte "In Use RAM" right away after a soft-reset and only around 23 Mbyte will ever be the most free RAM the programs can use on this device.

    However I have to regularly soft-reset the device to get the free 23 Mbyte back, the reason is a comment you can find above.  

    Can you please comment what Larry said in April about 10 comments ago? His comment was a bit spicy and nervous, but I can understand his disappointment.

    Thank you very much!

    Wishing you lots of success and pleasure in your work!

    Best regards,

    Tomaso

  109. Arif says:

    Hi Mike,

    It’s nice to see that I’m not alone with my problem –  virtually every writer in this thread is reporting about memory leaks. So it does my T-mobile Wing (HTC HERA-110) with WM6 and it means that this memory BUG survived your next release and happily transfered to its new nest. Well as was written by Larry IT IS NOT a single program issue and is not OEM problem or something – it is a core OS memory management problem because it persists on different WM5 and WM6 device. It could be related to segmentation or global allocation tables or whatsoever, but you must realize that EVRY application being once started does not return a bit of memory after closing. And do not appease us and yourself – this memory became unusable and that is not just "numbers" issue – after a day-two the lack of memory causes programs not to start due to the "Not enougth memory" issue. For example built-in camera in my phone pops up with "No memory" message box after just one day not resetting the device (I’ve tried to use my phone after warm reset with only vendor’s software, so there were no 3rd party programs on it at all). So please investigate it thoroughly please. I hope to enjoy the update during lifetime of my current device πŸ™‚

    P.S. Whats the stupid idea was to remove "Backup" feature from ActiveSync? Whos responsible for that and what was the point? Are those the customers who demanded to do so indeed?

    Sincerely,

    Arif

  110. Arif says:

    Correction:

    …use my phone after warm reset

    Te reset was COLD – full erase to default sate.

    Arif

  111. MikeCal says:

    Tomaso (and Larry if you’re still reading) I’m sorry that I missed the message back in April.  It is definitely not the case that every single app on the device leaks memory.  However, please understand that when you tap the "X" button you’re not closing the app.  So if you launch solitaire and then hit the X button, it will not free up any memory.  We don’t close apps until we need to.  Please see the equally controversial "The Emperor has no Close" entry (http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-Emperor-Has-No-Close.aspx).

    Arif, we believe we fixed the reported ActiveSync leak.  There very well could be others, and they could be in anything.  They could be in OEM code, they could be in ISV code, and they could be in our code.  We DO check our code and, to our knowledge, it’s not leaking.  But if you find a program that is, please let us know and we’ll fix it.  

    Note, however, that there is more software on your Wing that was NOT written by Microsoft than there is software that WAS written by Microsoft.  We investigate our code, but we can’t reasonably investigate every piece of code written by other people and put onto any device that uses our OS.  

    Mike

  112. Arif says:

    Mike,

    Of course I do know that tapping "X" does not close an application. It does not matter how to close applications – to use task manager or to use "Exit option" (if exists) from menu – used memory still increases. Furthermore. It needs a clarification. The term "memory leak" is ambiguos – as far as I understand if any application inside the "big" OS leaks in memory, it affects only its own process and memory  frees just after this process will be terminated. Heap and global allocs free as well. Does it mean that WM5 and WM6 behave differently in regards of memory allocations and hold commited memory uncleared even after ternination of such a leaking application? Does it mean that ANY open handle remains unreleased if application will terminated abruptly? If so there is nothing to wonder that used memory is increasing permanenly since MOST programs have no "exit" option and simple sending of WM_CLOSE message will just close the main window but will not release all the memory. Such a sad tale if so…

    About sofware. When I wrote "there were no 3rd party programs on it at all" I meant that I’ve cleared it from non-Microsoft software (even removed autorun apps from registry) exept core phone application, trying to make "clear" experiment. So I’ve checked memory issue using only Microsoft’s ones. Such as pWord, pExcel, Media Player and, yes, Solitaire, closing it with the task manager. I must emphsise one thing – the programs like Solitaire eats pretty small amountof memory so the memory usage control could not reflect it at the time because it counts memory in tenths of megabytes and if the amount of leaked memory is less than this number, it could not reflect the change. But it will if to repeate run-end procedure few times.

    Regards,

    Arif

  113. Dodge says:

    Hi, i have Symbol MC9090 device, onto witch i installed mobile netcf.all.wce4.ARMV4.cab file, i also installed my .Net application in My DevicesWindowsMyApplication

    folder, and it stays on if i do warm boot, but if i do cold but everything is deleted (?), so i was wondering how can i keep all the files i install onto MC9090  to stay on, and not beeing deleted if i do cold boot(?)

    Thank you all in advance.

  114. MikeCal says:

    Arif, WM5 and WM6 are essentially the same with regards to memory management.  We may have adjusted the algorithm we use to send WM_CLOSE messages to apps when we want them to close, but we didn’t change the behavior of the OS when that happens.

    You’re saying that you see the memory increase progressively if you just launch Solitare, close it in Task manager, and launch it again?  I’ve got a WM6 Pro device on my desk that I’ll give this a try with later on this afternoon.  

    Dodge, you’re installing your files into the user storage area.  If user storage is cleared, your files will be removed.  To install bits that persist past the clearing of user storage, they need to be part of the main OS image.  Only an OEM can put files there.  So you’d need to work with Symbol to get your files into the image.

    Mike

  115. MikeCal says:

    Arif, I’ve done a fair amount of testing and I don’t see what you’re describing.  Can you give me more data?  Give me the exact steps you’re using to repro the memory leaks and the exact numbers you’re seeing?

    Here’s what I did.  I started with an HTC Kaiser running WM6 Professional (PocketPC).  I booted it went to Start->Settings->System->Memory.  I then wrote down the In Use RAM amount on my white board.

    Then I ran solitaire and exited it.  I do see the memory go up some here, and I’ll explain why in a bit.  I then ran and exited solitaire 10 more times.  I didn’t see the ram usage go up any more.

    Then I ran and exited Media player.  Again the in use RAM went up a bit.  I then ran and exited it 10 to 15 more times.  The in use RAM didn’t budge.

    I then ran pWord, pExcel, and pIE 15 times each.  In all cases, the memory didn’t budge after the inital run.

    In every case, I started the program, then exited it.  If there are more steps in between that I should be doing to repro the memory leaks you’re describing, please send them to me.

    If running and exiting a program repeatedly makes the RAM usage continue to increase, it’s a problem.  The more you use the device, the less RAM you’ll have available.  If running a program once has a small (10 -15 K) one time overhead that doesn’t grow with further runs of the program, we don’t consider it to be a problem.

    So, where do these one time usages come from and what are they for?  Our system has a number of caches used for various things.  For instance, our windowing system will load bitmaps from the flash into RAM when a program uses them.  If they’re needed again, it will have them on hand in RAM.  If they’re not, eventually other things will go into the cache instead.  We start with our caches small and make them larger as necessary.  So if solitaire loads a bunch of bitmaps, we may grow our bitmap cache to accomodate them.  When solitaire goes away and then comes back, the cache is already the right size, so it doesn’t grow anymore.  When something else runs, if it needs less caching than Solitaire did, it just uses the existing cache.  If it needs more, we grow it some more.  We generally don’t shrink the caches unless it’s really necessary.  They’re there for a reason, and we keep them around to do their job.

    If you’ve got a set of steps to continuously grow the ram usage without end, I definitely want to know about it.  If you have a set of steps that, using Microsoft provided programs, can grow the caches by an entire megabyte, I also want to know.  

    If running a bunch of apps and closing them results in a one time hit of a few hundred K, the system is working as I expect it to.

    Mike  

  116. Someone says:

    Hello everyone,

    I just stumbled onto this blog when I was searching about memory for pocket pc’s and I am pretty impressed. Good questions are being asked and Mike is doing a fantastic job answering them. I am getting an HP iPAQ hx2495 in 2 weeks time and I plan to test it’s capabilites and its weaknesses(memory leaks, etc..). Keep up the good work and the questions.

    One other thing, I heard of a program that can overclock any PXA270 processor to a whooping 800Mhz or so. I am just interested if someone in here heard about it?

    Thanks  

  117. Willy says:

    While searching for memory leaks on Windows Mobile (ActiveSync), I found this thread.

    One of the ActiveSync memory leaks is easy to demonstrate.

    I have a MIO A701 which syncs contacts, tasks, .. with my PC, no mail however. Each time you plug-in the USB cable and the syncing check starts, you loose memory.

    At startup WM5 uses 16.19MB. The following numbers are program memory usages, each time after plugging-in the USB cable (no data changed in the meantime): 19.97MB, 20.07MB,  20.09MB,  20.15MB, 20.21MB, 20.26MB, 20.27MB, 20.30MB,   20.32MB, …

    When you have the habit of unplugging the pone for each phone conversation, you are accumulating the memory leaks at each phone call.

    Does an update of ActiveSync on the mobile exists to solve this problem?

    Or is it due to configuration settings?

    Thanks.

  118. Anay says:

    I used to think Microsoft people have some thinking power in their minds. I have to reboot my HTC P3400 once in 2 days just like any Windows πŸ™ πŸ™ machine.

  119. Anay says:

    Also Activesync starts without any reason. Every once in a while, i look into the task bar, and Activesync is running. Why??? When I sync my phone with my PC and close activesync, and detach device from PC, Activesync starts again!!!!

    After I reset the device, I start with 49% mem usage, after 2 full days of just SMS, WM Player, Pictures and Videos, Phone and once or twice MS Word use, it goes up to 55% to 60%, then I can’t use any app. No MS Word, no WMP, no pictures and videos. I have to reset it.

  120. Vomithaus says:

    I have an XDA running WM5 and am not seeing these ram issues.  My built in wifi on it is broken, so I have to use an SDIO card… believe me.. I watch my ram.  

    To anyone out there with ram issues, why not just install a nice big 4gig memory card?  If you spring for a fast one, it is sometimes more efficient than running in on-board memory.  WM5 (wm2002,2003 and wm6) actually can handle memory cards (unlike PalmOS)

    I do agree that wm2003 on a 400mhz machine seems faster than wm5 on a 500mhz… however, the 2003 machine is 320×240 whereas the wm5 is 640×480.  

    Also… I am so sick and tired of hearing the word ‘bloat’ associated with microsoft.  It seems like as soon as someone notices that a program takes up space in storage, they become an expert on coding and can readily see that the software is sloppily written and ‘junk’.  I suffered with PALMOS for a number of years, and I can say that although it is not ‘junk’, it is software that has not evolved to fit the machine it is running on.  WM5 (and WM6 now) represents an attempt to adapt to new hardware.  Try and run apps on a palmos machine from the memory storage card.. you will see what I mean.

  121. kun says:

    Mike,

    I hope you could re-visit this thread again.

    I am developing an application that should work on a WM5 device with 32M RAM. There is no real device for me to debug. I have to use the WM5 emulator. After I specified the RAM size to 64M, I could get the Program Memory size to 21M. I think it could simulate a WM5 device with 32M RAM. But the In Use Program Memory is about 18.5M, that is not unacceptable.

    In your above article, you mentioned "had we configured the WM5 emulator differently, it would have reported about 7M".  That means you could get 10M RAM back. Could you let me know how to do that? Thanks.

  122. Thiago says:

    Lot of blablabla…

    Are people from WM waiting for the same frustration as Vista do? Work more and reduce memory usage. If people from seven can do why you can’t do too?

Skip to main content