public final class MemoryUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
static long |
KB |
static java.lang.String |
MEMORY_INFO_PATH |
| Modifier and Type | Method and Description |
|---|---|
static long |
getFreeMemorySize(android.content.Context context)
get free memory
|
static int |
getPidMemorySize(int pid,
android.content.Context context)
get the memory of process with certain pid
|
static long |
getTotalMemory()
read the total memory (kb) of certain device
|
public static final java.lang.String MEMORY_INFO_PATH
public static final int BUFFER_SIZE
public static final long KB
public static long getTotalMemory()
public static long getFreeMemorySize(android.content.Context context)
context - Contextpublic static int getPidMemorySize(int pid,
android.content.Context context)
pid - pid of processcontext - context of certain activity