|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdalvik.system.VMRuntime
public final class VMRuntime
Provides an interface to VM-global, Dalvik-specific features. An application cannot create its own Runtime instance, and must obtain one from the getRuntime method.
| Method Summary | |
|---|---|
void |
gcSoftReferences()
Requests that the virtual machine collect available memory, and collects any SoftReferences that are not strongly-reachable. |
long |
getExternalBytesAllocated()
Returns the number of externally-allocated bytes being tracked by trackExternalAllocation/Free(). |
long |
getMinimumHeapSize()
Returns the minimum heap size, or zero if no minimum is in effect. |
static VMRuntime |
getRuntime()
Returns the object that represents the VM instance's Dalvik-specific runtime environment. |
float |
getTargetHeapUtilization()
Gets the current ideal heap utilization, represented as a number between zero and one. |
void |
runFinalizationSync()
Does not return until any pending finalizers have been called. |
long |
setMinimumHeapSize(long size)
Sets the desired minimum heap size, and returns the old minimum size. |
float |
setTargetHeapUtilization(float newTarget)
Sets the current ideal heap utilization, represented as a number between zero and one. |
boolean |
trackExternalAllocation(long size)
Asks the VM if <size> bytes can be allocated in an external heap. |
void |
trackExternalFree(long size)
Tells the VM that <size> bytes have been freed in an external heap. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static VMRuntime getRuntime()
public float getTargetHeapUtilization()
public float setTargetHeapUtilization(float newTarget)
newTarget - the new suggested ideal heap utilization.
This value may be adjusted internally.
IllegalArgumentException - if newTarget is <= 0.0 or >= 1.0public long getMinimumHeapSize()
public long setMinimumHeapSize(long size)
size - the new suggested minimum heap size, in bytes
public void gcSoftReferences()
public void runFinalizationSync()
public boolean trackExternalAllocation(long size)
size - The number of bytes that have been allocated.
public void trackExternalFree(long size)
size - The number of bytes that have been freed. This same number
should have been passed to trackExternalAlloc() when
the underlying memory was originally allocated.public long getExternalBytesAllocated()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||