summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/class.h')
-rw-r--r--runtime/mirror/class.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 1751f32c3e..f8f414b3d9 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -586,6 +586,9 @@ class MANAGED Class FINAL : public Object {
static MemberOffset ObjectSizeOffset() {
return OFFSET_OF_OBJECT_MEMBER(Class, object_size_);
}
+ static MemberOffset ObjectSizeAllocFastPathOffset() {
+ return OFFSET_OF_OBJECT_MEMBER(Class, object_size_alloc_fast_path_);
+ }
void SetObjectSize(uint32_t new_object_size) REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(!IsVariableSize());
@@ -593,6 +596,8 @@ class MANAGED Class FINAL : public Object {
return SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, object_size_), new_object_size);
}
+ void SetObjectSizeAllocFastPath(uint32_t new_object_size) REQUIRES_SHARED(Locks::mutator_lock_);
+
void SetObjectSizeWithoutChecks(uint32_t new_object_size)
REQUIRES_SHARED(Locks::mutator_lock_) {
// Not called within a transaction.
@@ -1457,6 +1462,10 @@ class MANAGED Class FINAL : public Object {
// See also class_size_.
uint32_t object_size_;
+ // Aligned object size for allocation fast path. The value is max int if the object is
+ // uninitialized or finalizable. Not currently used for variable sized objects.
+ uint32_t object_size_alloc_fast_path_;
+
// The lower 16 bits contains a Primitive::Type value. The upper 16
// bits contains the size shift of the primitive type.
uint32_t primitive_type_;