locked
Minimum available RAM?

    Question

  • Do apps have a guaranteed amount of availabe RAM?

    Or is there _anything_ which could help an app to decide wether to save memory or to do some caching?

    Monday, January 7, 2013 3:53 PM

Answers

  • In general, Windows system is responsible to manage memory resources for your app. In case of memory pressure, system autmatically makes decision which suspended apps will be terminated according to specific algorithm.

    Recommended memory metrics as below. This is only for your reference. It probably varies with different scenarios.

    App complexity (approx.)

          Total working set (max)

    Minimal app (ex. Hello World)

          50-70 MB

    Medium app (ex. Weather)

          80-100 MB

    Large app (ex. Photos)

          120-150 MB

    See more details How to improve performance in your Metro style app


    Robin [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Tuesday, January 8, 2013 9:57 AM
    Moderator

All replies

  • In general, Windows system is responsible to manage memory resources for your app. In case of memory pressure, system autmatically makes decision which suspended apps will be terminated according to specific algorithm.

    Recommended memory metrics as below. This is only for your reference. It probably varies with different scenarios.

    App complexity (approx.)

          Total working set (max)

    Minimal app (ex. Hello World)

          50-70 MB

    Medium app (ex. Weather)

          80-100 MB

    Large app (ex. Photos)

          120-150 MB

    See more details How to improve performance in your Metro style app


    Robin [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.



    Tuesday, January 8, 2013 9:57 AM
    Moderator
  • In case of memory pressure, system autmatically makes decision which suspended apps will be terminated according to specific algorithm.

    *g* Correct. That's why the operating system terminates the active app with an OutOfMemoryException ...

    Scenario 1: An app reads data from online services. To improve performance the app caches the data. To prevent crashes the app should only cache as much data as fits into memory.

    Scenario 2: An app shows a list of images. Thanks to virtualization not being too efficient, the app may run into an OutOfMemoryException when scrolling through the list. To prevent crashes the app should only show images if they fin into memory.

    Since there's no API which informs about how much memory is left, I want to make an educated guess - that's why I asked for a guaranteed minimum amount.

    Without any information I'd need to stop caching and to never show a list of arbitrary amounts of images, both of wich isn't what the user expects from his device.

    Tuesday, January 8, 2013 4:05 PM