Provide the required out parameter to the trim routine.
Resolves http://b/issue?id=3040192.
Change-Id: I886a2dc99956b06e953f03ac390865b118b634a3
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index 09a997b..b31c638 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -1651,6 +1651,8 @@
*/
static bool externalAllocPossible(const HeapSource *hs, size_t n)
{
+ size_t bytesTrimmed[HEAP_SOURCE_MAX_HEAP_COUNT];
+
/*
* If there is sufficient space return immediately.
*/
@@ -1690,7 +1692,7 @@
/*
* Try trimming the mspace to reclaim unused pages.
*/
- dvmHeapSourceTrim(NULL, 0);
+ dvmHeapSourceTrim(bytesTrimmed, NELEM(bytesTrimmed));
if (externalBytesAvailable(hs, n)) {
return true;
}