summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dalvik/src/main/java/dalvik/system/VMRuntime.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMRuntime.java b/dalvik/src/main/java/dalvik/system/VMRuntime.java
index 71098be..239a876 100644
--- a/dalvik/src/main/java/dalvik/system/VMRuntime.java
+++ b/dalvik/src/main/java/dalvik/system/VMRuntime.java
@@ -107,6 +107,31 @@ public final class VMRuntime {
}
/**
+ * @hide
+ */
+ public float setTargetHeapMinFree(int size) {
+ /* Synchronize to make sure that only one thread gets
+ * a given "old" value if both update at the same time.
+ * Allows for reliable save-and-restore semantics.
+ */
+ synchronized (this) {
+ return nativeSetTargetHeapMinFree(size);
+ }
+ }
+ /**
+ * @hide
+ */
+ public float setTargetHeapConcurrentStart(int size) {
+ /* Synchronize to make sure that only one thread gets
+ * a given "old" value if both update at the same time.
+ * Allows for reliable save-and-restore semantics.
+ */
+ synchronized (this) {
+ return nativeSetTargetHeapConcurrentStart(size);
+ }
+ }
+
+ /**
* Sets the target SDK version. Should only be called before the
* app starts to run, because it may change the VM's behavior in
* dangerous ways. Use 0 to mean "current" (since callers won't
@@ -156,6 +181,12 @@ public final class VMRuntime {
* This value may be adjusted internally.
*/
private native void nativeSetTargetHeapUtilization(float newTarget);
+ /* @hide
+ */
+ private native int nativeSetTargetHeapMinFree(int size);
+ /* @hide
+ */
+ private native int nativeSetTargetHeapConcurrentStart(int size);
/**
* This method exists for binary compatibility. It was part of