Add VMRuntime.clampGrowthLimit
Used to release virtual memory for apps with small heaps according
to manifest.
Bug: 18387825
Bug: 17131630
(cherry picked from commit 26408c2c83bf134adb32b992feb74753824682b3)
Change-Id: I19148cab7c97e7ea509280614ece802bf322cf32
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index b054fb3..b885ed2 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -276,6 +276,12 @@
public native void clearGrowthLimit();
/**
+ * Make the current growth limit the new non growth limit capacity by releasing pages which
+ * are after the growth limit but before the non growth limit capacity.
+ */
+ public native void clampGrowthLimit();
+
+ /**
* Returns true if either a Java debugger or native debugger is active.
*/
public native boolean isDebuggerActive();