In sweepBitmapCallback, index into ptrs, rather than increment.
The arm seems to only have data changes from this change, so should
not change performance.
Change-Id: I32e40ccc2724fccb5996cbafb9f3872785544ae3
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index 912be0c..e5cbf81 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -1070,12 +1070,11 @@
const ClassObject *const classJavaLangClass = gDvm.classJavaLangClass;
const bool overwriteFree = gDvm.overwriteFree;
size_t i;
- void **origPtrs = ptrs;
for (i = 0; i < numPtrs; i++) {
Object *obj;
- obj = (Object *)*ptrs++;
+ obj = (Object *)ptrs[i];
/* This assumes that java.lang.Class will never go away.
* If it can, and we were the last reference to it, it
@@ -1103,7 +1102,7 @@
}
// TODO: dvmHeapSourceFreeList has a loop, just like the above
// does. Consider collapsing the two loops to save overhead.
- dvmHeapSourceFreeList(numPtrs, origPtrs);
+ dvmHeapSourceFreeList(numPtrs, ptrs);
return true;
}