public static class ActivityManager.MemoryInfo
extends Object implements Parcelable
| java.lang.Object | |
| android.app.ActivityManager.MemoryInfo | |
您可以通过 getMemoryInfo(ActivityManager.MemoryInfo)获取有关可用内存的 getMemoryInfo(ActivityManager.MemoryInfo) 。
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<ActivityManager.MemoryInfo> |
CREATOR |
public long |
availMem 系统上的可用内存。 |
public boolean |
lowMemory 如果系统认为自己目前处于内存不足的状态,则设置为true。 |
public long |
threshold 我们认为内存不足的阈值 |
public long |
totalMem 内核可访问的总内存。 |
Public constructors |
|
|---|---|
ActivityManager.MemoryInfo() |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
void |
readFromParcel(Parcel source) |
void |
writeToParcel(Parcel dest, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
long availMem
系统上的可用内存。 这个数字不应该被认为是绝对的:由于内核的性质,这个内存的很大一部分实际上正在被使用,并且整个系统运行良好。
long totalMem
内核可访问的总内存。 这基本上是设备的RAM大小,不包括低于内核的固定分配,如DMA缓冲区,基带CPU的RAM等。
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
void readFromParcel (Parcel source)
| 参数(Parameters) | |
|---|---|
source |
Parcel
|
void writeToParcel (Parcel dest, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |