Merge "Make LoadClass collect garbage as promised" am: e16473b1da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2150615 Change-Id: I3f59501e1ebb647b7917ba575e2886c5a5f87823 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
import android.os.Debug;
|
import android.os.Debug;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a class, runs the garbage collector, and prints showmap output.
|
* Loads a class, runs the garbage collector, and prints showmap output.
|
||||||
@@ -46,7 +46,7 @@ class LoadClass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.gc();
|
Runtime.getRuntime().gc();
|
||||||
|
|
||||||
int allocCount = Debug.getGlobalAllocCount();
|
int allocCount = Debug.getGlobalAllocCount();
|
||||||
int allocSize = Debug.getGlobalAllocSize();
|
int allocSize = Debug.getGlobalAllocSize();
|
||||||
|
|||||||
Reference in New Issue
Block a user