locked
Can we Get Application Memory usage through code for windows store app(XAML/C#) ?

    Question

  • In Windows Phone 8 apps , we have DeviceStatus class in (Windows.Phone.System.Memory) to get the memory usage info.Is there some API similar to this for windows store apps too. to get the memory usage details? 


    Nikhil Sharma10

    Tuesday, June 24, 2014 6:28 AM

Answers

  • This looks like what you want:

    Windows.System.MemoryManager
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.memorymanager.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, June 24, 2014 12:29 PM
    Moderator
  • The api's Matt metioned are only there for Windows Phone 8.1 store apps, not windows store apps. I dont think there is an api for windows store apps. for what purpose you need it?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, June 25, 2014 1:50 PM
  • Good catch Dave, I didn't see that.
    Your question is the right one - why is this needed?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, June 25, 2014 1:57 PM
    Moderator

All replies

  • This looks like what you want:

    Windows.System.MemoryManager
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.memorymanager.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, June 24, 2014 12:29 PM
    Moderator
  • Hi

    I created a blank Windows store app to test the above API. It does not show Windows.System.MemoryManager. The only available classes I could see under Windows.System are

    Display, Profile, RemoteDesktop, Threading and UserProfile.

    Do I need to add some reference, before I Could use Windows.System.MemoryManager in my Windows store APP using C#/XAML.?

    Regards

    Nikhil


    Nikhil Sharma10

    Wednesday, June 25, 2014 4:12 AM
  • The api's Matt metioned are only there for Windows Phone 8.1 store apps, not windows store apps. I dont think there is an api for windows store apps. for what purpose you need it?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, June 25, 2014 1:50 PM
  • Good catch Dave, I didn't see that.
    Your question is the right one - why is this needed?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, June 25, 2014 1:57 PM
    Moderator
  • Hi,

    I was trying to make an app Which also keeps a check on the current memory usage of the app.

    Accordingly I could monitor the amount of data I could store in app, to increase the performance of app.


    Nikhil Sharma10

    Thursday, June 26, 2014 4:23 AM