Remove the dvmHeapSizeChanged no-op routine.
Change-Id: I6deb4ea858610edee6e7aa44d49d91cae5a25404
diff --git a/vm/alloc/Heap.c b/vm/alloc/Heap.c
index f063b45..1d8cfde 100644
--- a/vm/alloc/Heap.c
+++ b/vm/alloc/Heap.c
@@ -219,13 +219,6 @@
return obj;
}
-/* Whenever the effective heap size may have changed,
- * this function must be called.
- */
-void dvmHeapSizeChanged()
-{
-}
-
/* Do a full garbage collection, which may grow the
* heap as a side-effect if the live set is large.
*/
@@ -309,7 +302,6 @@
* Try harder, growing the heap if necessary.
*/
ptr = dvmHeapSourceAllocAndGrow(size);
- dvmHeapSizeChanged();
if (ptr != NULL) {
size_t newHeapSize;
@@ -335,7 +327,6 @@
size);
gcForMalloc(true);
ptr = dvmHeapSourceAllocAndGrow(size);
- dvmHeapSizeChanged();
if (ptr != NULL) {
return ptr;
}
@@ -843,7 +834,6 @@
* it just lets the heap grow more when necessary.
*/
dvmHeapSourceGrowForUtilization();
- dvmHeapSizeChanged();
#if WITH_HPROF
if (gcHeap->hprofContext != NULL) {
diff --git a/vm/alloc/HeapInternal.h b/vm/alloc/HeapInternal.h
index 773ebc3..0298f84 100644
--- a/vm/alloc/HeapInternal.h
+++ b/vm/alloc/HeapInternal.h
@@ -125,7 +125,6 @@
void dvmUnlockHeap(void);
void dvmLogGcStats(size_t numFreed, size_t sizeFreed, size_t gcTimeMs);
void dvmLogMadviseStats(size_t madvisedSizes[], size_t arrayLen);
-void dvmHeapSizeChanged(void);
/*
* Logging helpers
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index 62c0740..f13cf21 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -1700,7 +1700,6 @@
*/
HSTRACE("EXTERNAL alloc %zd: frag\n", n);
ret = externalAlloc(hs, n, true);
- dvmHeapSizeChanged();
if (ret) {
goto out;
}
@@ -1711,7 +1710,6 @@
HSTRACE("EXTERNAL alloc %zd: GC 2\n", n);
gcForExternalAlloc(true); // collect SoftReferences
ret = externalAlloc(hs, n, true);
- dvmHeapSizeChanged();
if (!ret) {
LOGE_HEAP("Out of external memory on a %zu-byte allocation.\n", n);
}