java.lang.Object | |
↳ | dalvik.system.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.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Requests that the virtual machine collect available memory,
and collects any SoftReferences that are not strongly-reachable.
| |||||||||||
Returns the number of externally-allocated bytes being tracked by
trackExternalAllocation/Free().
| |||||||||||
Returns the minimum heap size, or zero if no minimum is in effect.
| |||||||||||
Returns the object that represents the VM instance's Dalvik-specific
runtime environment.
| |||||||||||
Gets the current ideal heap utilization, represented as a number
between zero and one.
| |||||||||||
Does not return until any pending finalizers have been called.
| |||||||||||
Sets the desired minimum heap size, and returns the
old minimum size.
| |||||||||||
Sets the current ideal heap utilization, represented as a number
between zero and one.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Requests that the virtual machine collect available memory, and collects any SoftReferences that are not strongly-reachable.
Returns the number of externally-allocated bytes being tracked by trackExternalAllocation/Free().
Returns the minimum heap size, or zero if no minimum is in effect.
Returns the object that represents the VM instance's Dalvik-specific runtime environment.
Gets the current ideal heap utilization, represented as a number between zero and one. After a GC happens, the Dalvik heap may be resized so that (size of live objects) / (size of heap) is equal to this number.
Does not return until any pending finalizers have been called. This may or may not happen in the context of the calling thread. No exceptions will escape.
Sets the desired minimum heap size, and returns the old minimum size. If size is larger than the maximum size, the maximum size will be used. If size is zero or negative, the minimum size constraint will be removed. Synchronized to make the order of the exchange reliable.
size | the new suggested minimum heap size, in bytes |
---|
Sets the current ideal heap utilization, represented as a number between zero and one. After a GC happens, the Dalvik heap may be resized so that (size of live objects) / (size of heap) is equal to this number.
newTarget | the new suggested ideal heap utilization. This value may be adjusted internally. |
---|
IllegalArgumentException | if newTarget is <= 0.0 or >= 1.0 |
---|