ALLOC_NO_GC is no longer used; remove it, and the nonCollectableRefs table.
Clean up dvmHeapInitHeapRefTable's interface to know the default size.
Change-Id: I535fdfe39924f6f65f286e2809002c2a0e6411b6
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index b7f83b3..865e154 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -209,11 +209,7 @@
*/
void dvmHeapMarkRootSet()
{
- HeapRefTable *refs;
- GcHeap *gcHeap;
- Object **op;
-
- gcHeap = gDvm.gcHeap;
+ GcHeap *gcHeap = gDvm.gcHeap;
HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_STICKY_CLASS, 0);
@@ -260,15 +256,6 @@
HPROF_SET_GC_SCAN_STATE(HPROF_ROOT_VM_INTERNAL, 0);
- /* Mark all ALLOC_NO_GC objects.
- */
- LOG_SCAN("ALLOC_NO_GC objects\n");
- refs = &gcHeap->nonCollectableRefs;
- op = refs->table;
- while ((uintptr_t)op < (uintptr_t)refs->nextEntry) {
- dvmMarkObjectNonNull(*(op++));
- }
-
/* Mark any special objects we have sitting around.
*/
LOG_SCAN("special objects\n");
@@ -745,7 +732,7 @@
/* Create a table that the new pending refs will
* be added to.
*/
- if (!dvmHeapInitHeapRefTable(&newPendingRefs, 128)) {
+ if (!dvmHeapInitHeapRefTable(&newPendingRefs)) {
//TODO: mark all finalizable refs and hope that
// we can schedule them next time. Watch out,
// because we may be expecting to free up space