Skip to content

Commit 11729f1

Browse files
committed
Fix get_lo_object_size
1 parent 231660d commit 11729f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmtk/src/object_model.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ pub unsafe fn get_so_object_size(object: ObjectReference) -> usize {
318318
#[inline(always)]
319319
pub unsafe fn get_lo_object_size(object: ObjectReference) -> usize {
320320
let obj_address = object.to_raw_address();
321-
let julia_big_object = obj_address.to_ptr::<_bigval_t>();
321+
let julia_big_object = (obj_address - std::mem::size_of::<_bigval_t>()).to_ptr::<_bigval_t>();
322322
return (*julia_big_object).sz;
323323
}
324324

0 commit comments

Comments
 (0)