Jump to content


Photo

Windows Phone memory management, a brief guide

- - - - -

  • Please log in to reply
No replies to this topic

#1
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,253 posts
  • Gender:Male
  • Location:northampton
  • Devices:Moto E
As an owner of a Nokia Lumia 610, I have seen many Windows Phone Applications terminate on me with OOM (Out of Memory) exceptions. Let me explain why.

A Windows Phone device with 512mb RAM uses it's RAM as follows:
  • Modem 30MB
  • Graphics 40MB including display buffers, video encode/decode, camera, etc
  • OS 50MB
  • Device drivers 40MB including system services, page pool, system caches, etc
  • Background audio 40MB plus various buffers
This leaves around 312MB for applications and games.

A Windows Phone device with 256mb RAM uses it's RAM as follows:
  • Modem 30MB
  • Graphics 40MB including display buffers, video encode/decode, camera, etc
  • OS 50MB
  • Device drivers 40MB including system services, page pool, system caches, etc
  • Background audio 40MB plus various buffers
This leaves around 56MB for applications and games!

To get around the paltry 56MB limitation for apps, Windows Phone Dev Center introduced Paging, also known as Virtual Memory, with Windows Phone SDK 7.1.1. This means that most applications running on a 256MB device will probably use Virtual Memory, as Windows Phone SDK has always had a 90MB recommended minimum memory usage cap. Some applications never use this minimum, but a lot of top applications do. On top of this, Windows Phone SDK 7.1.1 introduced a 110MB max memory cap for applications running on 256MB devices, any application requesting more than 110MB of physical and virtual memory will usually terminate with an OOM exception.

Sadly this 110MB cap never existed in Windows Phone SDK 7.0, and there are still a lot of applications in the Market Place that have not been refined to work within these limitations and the only way to find out is to have the application terminate on you halfway through what you have been doing.

Is there a way to see how much memory an application is using?

No there is not, because of the way Windows Phone multi-tasks, by freezing open apps and only letting the app you have displayed on screen work in full. Therefore you will only see the amount of RAM that application uses in standby, not in operation.

If you want to publish an app on the Windows Phone Market Place you must satisfy the Technical Certification Requirements: “5.2.5 Memory Consumption: An application must not exceed 90 MB of RAM usage, except on devices that have more than 256 MB of memory.”

There are ways for developers to track how much RAM their application uses. Unfortunately Microsoft have not forced all developers to fine tune their applications for the new Technical Certification Requirements.

The Windows Phone Market Place is also a very poor experience for a 256MB Windows Phone owner. Unlike the Google Play Store, the Windows Phone Market Place does not check what your device can not do. For example, my Nokia Lumia 610 does not have a compass, and as mentioned it only has 256MB RAM. But regardless of this, the Market Place shows every single application available to any device, and it's only when I click on it, that it suggests it may not be suitable as it requires a compass, or plainly tells me that it's unable to install.

A couple of examples: Google, Nokia City Lens, Pictures Lab and Skype.

Dear Microsoft: please fix the Market Place so it does not show applications that are not 100% compatible and do not work and please don't show applications that I cannot install.

Here's hoping the Windows Phone 8 user experience does not have the same pitfalls.

[Via: Windows Team Blog]

Click here to view the item

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users