Added in API level 1

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 null if no such memory statistic exists.

open MutableMap<String!, String!>!

Returns a map of the names/values of the memory statistics that getMemoryStat(java.lang.String) supports.

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

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

MemoryInfo

Added in API level 1
MemoryInfo()

Public methods

describeContents

Added in API level 5
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

Added in API level 23
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

Added in API level 23
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

Added in API level 19
open fun getTotalPrivateClean(): Int

Return total shared clean memory usage in kB.

getTotalPrivateDirty

Added in API level 5
open fun getTotalPrivateDirty(): Int

Return total private dirty memory usage in kB.

getTotalPss

Added in API level 5
open fun getTotalPss(): Int

Return total PSS memory usage in kB.

getTotalSharedClean

Added in API level 19
open fun getTotalSharedClean(): Int

Return total shared clean memory usage in kB.

getTotalSharedDirty

Added in API level 5
open fun getTotalSharedDirty(): Int

Return total shared dirty memory usage in kB.

getTotalSwappablePss

Added in API level 19
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 .

readFromParcel

Added in API level 5
open fun readFromParcel(source: Parcel!): Unit

writeToParcel

Added in API level 5
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

CREATOR

Added in API level 5
static val CREATOR: Parcelable.Creator<Debug.MemoryInfo!>

dalvikPrivateDirty

Added in API level 1
var dalvikPrivateDirty: Int

The private dirty pages used by dalvik heap.

dalvikPss

Added in API level 1
var dalvikPss: Int

The proportional set size for dalvik heap. (Doesn't include other Dalvik overhead.)

dalvikSharedDirty

Added in API level 1
var dalvikSharedDirty: Int

The shared dirty pages used by dalvik heap.

nativePrivateDirty

Added in API level 1
var nativePrivateDirty: Int

The private dirty pages used by the native heap.

nativePss

Added in API level 1
var nativePss: Int

The proportional set size for the native heap.

nativeSharedDirty

Added in API level 1
var nativeSharedDirty: Int

The shared dirty pages used by the native heap.

otherPrivateDirty

Added in API level 1
var otherPrivateDirty: Int

The private dirty pages used by everything else.

otherPss

Added in API level 1
var otherPss: Int

The proportional set size for everything else.

otherSharedDirty

Added in API level 1
var otherSharedDirty: Int

The shared dirty pages used by everything else.