Change Class layout to allocate an array of StaticField objects
immediately after the ClassObject, rather than use calloc.
This has the rather surprising and pleasing effect of increasing
charing about 150K per zygote-launced application, as measured at
start-up, after waiting and no-touching.
Change-Id: I6a6c9079f946eb99111326ed45f13ecfe544e4bb
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index f2d934c..459a238 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -361,7 +361,7 @@
int i;
//TODO: Optimize this with a bit vector or something
- f = clazz->sfields;
+ f = &clazz->sfields[0];
for (i = 0; i < clazz->sfieldCount; i++) {
char c = f->field.signature[0];
if (c == '[' || c == 'L') {
@@ -469,7 +469,7 @@
ClassObject *clazz;
assert(dvmIsValidObject(obj));
- LOGV_SCAN("0x%08x %s\n", (uint)obj, obj->clazz->name);
+ LOGV_SCAN("0x%08x %s\n", (uint)obj, obj->clazz->descriptor);
#if WITH_HPROF
if (gDvm.gcHeap->hprofContext != NULL) {