aboutsummaryrefslogtreecommitdiff
path: root/libjava/resolve.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r--libjava/resolve.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc
index ea50645..fbdc284 100644
--- a/libjava/resolve.cc
+++ b/libjava/resolve.cc
@@ -513,7 +513,10 @@ _Jv_PrepareClass(jclass klass)
}
}
- // set the instance size for the class
+ // Set the instance size for the class. Note that first we round it
+ // to the alignment required for Object; this keeps us in sync with
+ // our current ABI.
+ instance_size = ROUND (instance_size, __alignof__ (java::lang::Object));
clz->size_in_bytes = instance_size;
// allocate static memory