Share via


Debug.MemoryInfo.GetMemoryStat(String) Method

Definition

Returns the value of a particular memory statistic or null if no such memory statistic exists.

[Android.Runtime.Register("getMemoryStat", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetMemoryStat_Ljava_lang_String_Handler", ApiSince=23)]
public virtual string GetMemoryStat (string statName);
[<Android.Runtime.Register("getMemoryStat", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetMemoryStat_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member GetMemoryStat : string -> string
override this.GetMemoryStat : string -> string

Parameters

statName
String

Returns

Attributes

Remarks

Returns the value of a particular memory statistic or null if no such memory statistic exists.

The following table lists the memory statistics that are supported. Note that memory statistics may be added or removed in a future API level.

<table> <thead> <tr> <th>Memory statistic name</th> <th>Meaning</th> <th>Example</th> <th>Supported (API Levels)</th> </tr> </thead> <tbody> <tr> <td>summary.java-heap</td> <td>The private Java Heap usage in kB. This corresponds to the Java Heap field in the App Summary section output by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.native-heap</td> <td>The private Native Heap usage in kB. This corresponds to the Native Heap field in the App Summary section output by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.code</td> <td>The memory usage for static code and resources in kB. This corresponds to the Code field in the App Summary section output by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.stack</td> <td>The stack usage in kB. This corresponds to the Stack field in the App Summary section output by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.graphics</td> <td>The graphics usage in kB. This corresponds to the Graphics field in the App Summary section output by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.private-other</td> <td>Other private memory usage in kB. This corresponds to the Private Other field output in the App Summary section by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.system</td> <td>Shared and system memory usage in kB. This corresponds to the System field output in the App Summary section by dumpsys meminfo.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.total-pss</td> <td>Total PSS memory usage in kB.</td> <td>1442</td> <td>23</td> </tr> <tr> <td>summary.total-swap</td> <td>Total swap usage in kB.</td> <td>1442</td> <td>23</td> </tr> </tbody> </table>

Java documentation for android.os.Debug.MemoryInfo.getMemoryStat(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to