What are the app memory limits for Windows 10?

2019-02-17 04:43发布

问题:

The app memory limits for Windows Phone 8.1 are easily found on MSDN. But I cannot seem to find definitive info on memory limits for apps on Windows 10, and especially Windows 10 Mobile.

What are the limits for each device family (Xbox, desktop, phone, IoT)?

回答1:

I found they are available as follows:

  1. Windows.System.MemoryManager.AppMemoryUsage = current memory usage (unsigned long)
  2. Windows.System.MemoryManager.AppMemoryUsageLevel = 0, 1, 2, etc.
  3. Windows.System.MemoryManager.AppMemoryUsageLimit = for 512 MB models seems to be fixed to 185 MB, for 1GB models is 390 MB, and so on (unsigned long)

In our testings, a OutOfMemoryException is raised when AppMemoryUsage is close to AppMemoryUsageLimit and a new object cannot be allocated in contiguous free memspace. Seems that AppMemoryUsageLimit cannot be changed and is a fixed amount depending on the installed RAM, but not pretty sure for the moment.