In our tests, seems that memUsageLimit is fixed in function of installed RAM and platform. For smartphones (mostly ARM processors) the limits are
185 MB for 512 MB RAM device
390 MB for 1GB RAM device
900 MB for 2GB RAM device
For regular Windows + Intel platforms, we found the limit is about 20% more than physical available RAM, perhaps due to the ability of paging to disk.
My question is regarding the first group of devices (phones): is it possible to change the memory limit for a given application? We need to process a JSON document received via oData V4, and when processing with NewtonSoft, the memory consumption is very significant: for every MB of pure JSON data, the app process is increased about 9MB in a very linear fashion.
Allow Windows 10 to Allocate More RAMFind the This PC application and right-click the icon, then select Properties. Select Advanced system settings > Settings. Under the Visual Effects tab, there are four options. Select the Adjust for best performance option.
Win10 1.586 does provide a new API, TrySetAppMemoryUsageLimit, to set the app's memory limitation. However, based on internal discussion, this API only works for very limited scenario right now, such as VOIP application on mobile device. And the sample code and document for this API are not quite ready.
I have tested this API on the UWP VOIP sample and it does work(we need to set the sample project's target to 10586). The code looks like below:
var y = MemoryManager.AppMemoryUsageLimit;
bool result = MemoryManager.TrySetAppMemoryUsageLimit(y+10000);
As for your requirement, we will keep collecting the feedback about this feature. If there is any strong requirement, we will communicate with internal team. However, my personal suggestion for you is that: win store app has very strong safety policy for the apps. It is really not recommended for APP to exceed memory limitation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With