How to Get Memory Usage for a Running Tizen Application

Original Created Feb 03, 2020 | Regeneration Apr 22, 2026

I'm trying to retrieve the RAM usage for my currently running Tizen application. According to the documentation, it should be possible to get current RAM usage per running app.

I attempted to implement this in a basic analog clock application by modifying index.html and using the following code:

var myCurrentMemUsage = tizen.systeminfo.getCapability('http://tizen.org/runtime/memory.allocated.self');

However, this approach isn't working. I've tested on both Tizen 2016 and 2017 versions, and I receive the following console error:

NotSupportedError: Value for given key was not found undefined:
    getCapability

Could you please help me understand why this isn't working and suggest alternative methods to retrieve memory usage?

Problem Understanding

The user is attempting to monitor their application's memory usage in real-time using the Tizen systeminfo API. The current approach using getCapability with the memory.allocated.self key is not working as expected, throwing a NotSupportedError.

Solution Methods

  1. Using systeminfo API (Recommended Approach) The correct way to get memory information is through the tizen.systeminfo.getPropertyValue() method instead of getCapability. Here's the proper implementation:
tizen.systeminfo.getPropertyValue(
    "MEMORY",
    function(memory) {
        console.log("Total memory: " + memory.physical.total);
        console.log("Available memory: " + memory.physical.available);
        console.log("Used memory: " + (memory.physical.total - memory.physical.available));
    },
    function(error) {
        console.log("Error getting memory info: " + error.message);
    }
);
  1. Alternative Method for Application-Specific Memory Usage For application-specific memory usage, you can use the following approach:
tizen.application.getCurrentApplication().getMemoryUsage().then(
    function(memoryUsage) {
        console.log("Current app memory usage: " + memoryUsage);
    },
    function(error) {
        console.log("Error getting app memory usage: " + error.message);
    }
);

Additional Tips

  • Make sure your application has the proper privileges in config.xml:
<tizen:privilege name="http://tizen.org/privilege/systemmonitor"/>
  • The memory values returned are in kilobytes (KB)
  • For more detailed memory profiling, consider using the Tizen Studio Profiler tool
  • Remember that memory usage can fluctuate frequently, so consider implementing periodic checks rather than one-time measurements

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.