App memory limits for Windows Phone 8
January 07, 2014
Applies to: Windows Phone 8 only
We designed Windows Phone 8 to help you distribute your app to the broadest market possible. To help you accomplish this, when you design an app for lower-memory devices, which typically means phones with no more than 512 MB of memory, you can use any Windows Phone 8 feature you might use on higher-memory phones. However, every Windows Phone 8 app has a default cap on the amount of memory it can use, to ensure a good user experience for all tasks running on the phone. To maintain a quality app experience on all phones, you can request a higher memory cap for your app, or you can opt out of having your app available to install on a lower-memory device. Here, you can learn about memory limits for Windows Phone 8 apps, how to request a higher memory limit for your app, and how you can opt out of making your app available to install on lower-memory devices.
This topic contains the following sections.
The size of the default memory cap imposed on an app is determined by the type of the app as well as by the memory size of the device. The size of the higher memory cap that can be requested is determined solely by the memory size of the device. Typically, for Windows Phone 8, a phone with 512 MB of memory is considered a lower-memory device, but this can vary depending on the device. For example, if a phone has a high-resolution camera, for app purposes it may be considered a lower-memory device. The following table lists the default and higher memory caps in these categories.
XNA or native
XAML/.NET excluding XNA
All app types
To use the memory limits described in the preceding table, 2-GB phones must also have Windows Phone 8 Update 3 (that is, a version equal to or greater than 8.0.10492).
You can check the memory limit available to your app by checking the ApplicationWorkingSetLimit value using the DeviceExtendedProperties.GetValue(String) method. For an example of how to do this, see How to disable features in apps for lower-memory phones.
Although for optimal market reach you should design your app to run using the default memory cap for lower-memory phones, you can request more memory or you can opt out of lower-memory phones completely. If you want your app to be available to all phones, but with the possibility of impacting other phone tasks by utilizing more memory, you must add a FunctionalCapability entry to the app manifest file. To opt out of lower-memory devices, you must add a Requirements entry to the manifest.
The following table lists the entries you use in your app manifest file that can affect the memory limit of your app.
Doesn’t opt out of lower-memory devices (installs on all devices), but is granted the higher memory allocation instead of the default lower level.
Enforces the maximum memory limit by phone type: 180 MB on lower-memory phones; 380 MB on phones with > 1-GB memory.
Completely opts out of availability for lower-memory phones.
The app won’t appear in the Windows Phone Store for lower-memory phones and it can’t be installed on lower-memory phones.
These entries must be added manually to the manifest file and will not display in the Manifest Editor tool.
The FunctionalCapability element is a child of the FunctionalCapabilities element, which is a child of the App element. The FunctionalCapabilities element should be added after other children of the App element including the Requirements element, if both are present, or the manifest will not validate. Following is an example of the FunctionalCapabilities element.
<App> … <Requirements> <Requirement Name="ID_REQ_FRONTCAMERA"/> </Requirements> <FunctionalCapabilities> <FunctionalCapability Name="ID_FUNCCAP_EXTEND_MEM"/> </FunctionalCapabilities> </App>
The Requirement element is a child of the Requirements element, which is a child of the App element. The Requirements element should be listed after other elements in the App element, but before the FunctionalCapabilities element, if both are present. Following is an example of the Requirements element.
<App> … <Requirements> <Requirement Name="ID_REQ_FRONTCAMERA" /> <Requirement Name="ID_REQ_MEMORY_300" /> </Requirements> </App>
For more information on how to edit the manifest file, see How to modify the app manifest file for Windows Phone.
For more info about the app manifest file and app capabilities and requirements, see App manifest file for Windows Phone and App capabilities and hardware requirements for Windows Phone. For more info about detecting the amount of memory available to your app, and for info about how to disable features in your app to meet memory limits, see How to disable features in apps for lower-memory phones.