App memory limits for Windows Phone 8
May 03, 2013
Applies to: Windows Phone 8 only
Windows Phone 8 was designed to enable a developer to reach the broadest market possible. Because of this, there are no features that are disabled for lower-memory devices. Instead, each 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. There are also options for requesting a higher memory cap or opting out of lower-memory devices completely. In this topic, you will learn about the memory limits for Windows Phone 8 apps, how to request a higher memory limit, and how to opt out of lower-memory phones.
This topic contains the following sections.
There are different default caps depending on the device type and the type of app and a different higher cap depending on the device type. Typically a phone with greater than 1 GB of memory is considered a higher-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.
Higher-memory phones (WVGA, 720p, and WXGA)
XNA or native
XAML/.NET excluding XNA
All app types
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.