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/reflect/Proxy.c b/vm/reflect/Proxy.c
index 31df708..4270894 100644
--- a/vm/reflect/Proxy.c
+++ b/vm/reflect/Proxy.c
@@ -47,6 +47,7 @@
 
 /* private static fields in the Proxy class */
 #define kThrowsField    0
+#define kProxySFieldCount 1
 
 
 /*
@@ -177,7 +178,9 @@
     /*
      * Allocate storage for the class object and set some basic fields.
      */
-    newClass = (ClassObject*) dvmMalloc(sizeof(*newClass), ALLOC_DEFAULT);
+    newClass = (ClassObject*) dvmMalloc(sizeof(*newClass) +
+                                        kProxySFieldCount * sizeof(StaticField),
+                                        ALLOC_DEFAULT);
     if (newClass == NULL)
         goto bail;
     DVM_OBJECT_INIT(&newClass->obj, gDvm.unlinkedJavaLangClass);
@@ -228,8 +231,8 @@
      * Static field list.  We have one private field, for our list of
      * exceptions declared for each method.
      */
-    newClass->sfieldCount = 1;
-    newClass->sfields = (StaticField*) calloc(1, sizeof(StaticField));
+    assert(kProxySFieldCount == 1);
+    newClass->sfieldCount = kProxySFieldCount;
     StaticField* sfield = &newClass->sfields[kThrowsField];
     sfield->field.clazz = newClass;
     sfield->field.name = "throws";
@@ -1094,4 +1097,3 @@
     /* no match in declared throws */
     return true;
 }
-