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/oo/Object.c b/vm/oo/Object.c
index eff0983..fdb1a69 100644
--- a/vm/oo/Object.c
+++ b/vm/oo/Object.c
@@ -95,7 +95,7 @@
* fields, the VM allows you to have two fields with the same name so
* long as they have different types.
*/
- pField = clazz->sfields;
+ pField = &clazz->sfields[0];
for (i = 0; i < clazz->sfieldCount; i++, pField++) {
if (strcmp(fieldName, pField->field.name) == 0 &&
strcmp(signature, pField->field.signature) == 0)
@@ -739,4 +739,3 @@
clazz = clazz->super;
}
}
-