@@ -597,7 +597,6 @@ pub fn is_live_object<VM: VMBinding>(object: ObjectReference) -> bool {
597597/// It is the byte granularity of the valid object (VO) bit.
598598/// 3. Return false otherwise. This function never panics.
599599///
600- /// Case 2 means **this function is imprecise for misaligned addresses**.
601600/// This function uses the "valid object (VO) bits" side metadata, i.e. a bitmap.
602601/// For space efficiency, each bit of the bitmap governs a small region of memory.
603602/// The size of a region is currently defined as the [minimum object size](crate::util::constants::MIN_OBJECT_SIZE),
@@ -606,13 +605,8 @@ pub fn is_live_object<VM: VMBinding>(object: ObjectReference) -> bool {
606605/// The alignment of a region is also the region size.
607606/// If a VO bit is `1`, the bitmap cannot tell which address within the 4-byte or 8-byte region
608607/// is the valid object reference.
609- /// Therefore, if the input `addr` is not properly aligned, but is close to a valid object
610- /// reference, this function may still return true.
611- ///
612- /// For the reason above, the VM **must check if `addr` is properly aligned** before calling this
613- /// function. For most VMs, valid object references are always aligned to the word size, so
614- /// checking `addr.is_aligned_to(BYTES_IN_WORD)` should usually work. If you are paranoid, you can
615- /// always check against [`crate::util::is_mmtk_object::VO_BIT_REGION_SIZE`].
608+ /// Therefore, if this method returns true, the binding can compute the object reference by
609+ /// `(addr + IN_OBJECT_ADDRESS_OFFSET).align_up(ObjectReference::ALIGNMENT)` ([`crate::vm::ObjectModel::IN_OBJECT_ADDRESS_OFFSET`]).
616610///
617611/// This function is useful for conservative root scanning. The VM can iterate through all words in
618612/// a stack, filter out zeros, misaligned words, obviously out-of-range words (such as addresses
0 commit comments