MemoryInfo
class MemoryInfo : Parcelable
kotlin.Any | |
↳ | android.os.Debug.MemoryInfo |
This class is used to retrieved various statistics about the memory mappings for this process. The returned info is broken down by dalvik, native, and other. All results are in kB.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
Public methods | |
---|---|
open Int | |
open String! |
getMemoryStat(statName: String!) Returns the value of a particular memory statistic or |
open MutableMap<String!, String!>! |
Returns a map of the names/values of the memory statistics that |
open Int |
Return total shared clean memory usage in kB. |
open Int |
Return total private dirty memory usage in kB. |
open Int |
Return total PSS memory usage in kB. |
open Int |
Return total shared clean memory usage in kB. |
open Int |
Return total shared dirty memory usage in kB. |
open Int |
Return total PSS memory usage in kB mapping a file of one of the following extension: . |
open Unit |
readFromParcel(source: Parcel!) |
open Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<Debug.MemoryInfo!> | |
Int |
The private dirty pages used by dalvik heap. |
Int |
The proportional set size for dalvik heap. |
Int |
The shared dirty pages used by dalvik heap. |
Int |
The private dirty pages used by the native heap. |
Int |
The proportional set size for the native heap. |
Int |
The shared dirty pages used by the native heap. |
Int |
The private dirty pages used by everything else. |
Int |
The proportional set size for everything else. |
Int |
The shared dirty pages used by everything else. |
Public constructors
Public methods
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getMemoryStat
open fun getMemoryStat(statName: String!): String!
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.
Memory statistic name | Meaning | Example | Supported (API Levels) |
---|---|---|---|
summary.java-heap | The private Java Heap usage in kB. This corresponds to the Java Heap field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.native-heap | The private Native Heap usage in kB. This corresponds to the Native Heap field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.code | 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. | 1442 |
23 |
summary.stack | The stack usage in kB. This corresponds to the Stack field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.graphics | The graphics usage in kB. This corresponds to the Graphics field in the App Summary section output by dumpsys meminfo. | 1442 |
23 |
summary.private-other | Other private memory usage in kB. This corresponds to the Private Other field output in the App Summary section by dumpsys meminfo. | 1442 |
23 |
summary.system | Shared and system memory usage in kB. This corresponds to the System field output in the App Summary section by dumpsys meminfo. | 1442 |
23 |
summary.total-pss | Total PSS memory usage in kB. | 1442 |
23 |
summary.total-swap | Total swap usage in kB. | 1442 |
23 |
getMemoryStats
open fun getMemoryStats(): MutableMap<String!, String!>!
Returns a map of the names/values of the memory statistics that getMemoryStat(java.lang.String)
supports.
Return | |
---|---|
MutableMap<String!, String!>! |
a map of the names/values of the supported memory statistics. |
getTotalPrivateClean
open fun getTotalPrivateClean(): Int
Return total shared clean memory usage in kB.
getTotalPrivateDirty
open fun getTotalPrivateDirty(): Int
Return total private dirty memory usage in kB.
getTotalSharedClean
open fun getTotalSharedClean(): Int
Return total shared clean memory usage in kB.
getTotalSharedDirty
open fun getTotalSharedDirty(): Int
Return total shared dirty memory usage in kB.
getTotalSwappablePss
open fun getTotalSwappablePss(): Int
Return total PSS memory usage in kB mapping a file of one of the following extension: .so, .jar, .apk, .ttf, .dex, .odex, .oat, .art .
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
dalvikPrivateDirty
var dalvikPrivateDirty: Int
The private dirty pages used by dalvik heap.
dalvikPss
var dalvikPss: Int
The proportional set size for dalvik heap. (Doesn't include other Dalvik overhead.)
dalvikSharedDirty
var dalvikSharedDirty: Int
The shared dirty pages used by dalvik heap.
nativePrivateDirty
var nativePrivateDirty: Int
The private dirty pages used by the native heap.
nativeSharedDirty
var nativeSharedDirty: Int
The shared dirty pages used by the native heap.
otherPrivateDirty
var otherPrivateDirty: Int
The private dirty pages used by everything else.
otherSharedDirty
var otherSharedDirty: Int
The shared dirty pages used by everything else.