From 21d008cdcfcc615fb72eb328f54049b029cb2801 Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Thu, 5 Dec 2024 01:27:36 +0000 Subject: [PATCH] cargo fmt/doc --- src/util/metadata/side_metadata/mod.rs | 2 ++ src/util/metadata/vo_bit/mod.rs | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/util/metadata/side_metadata/mod.rs b/src/util/metadata/side_metadata/mod.rs index 3eacc5f0fd..0c10d86b47 100644 --- a/src/util/metadata/side_metadata/mod.rs +++ b/src/util/metadata/side_metadata/mod.rs @@ -23,6 +23,8 @@ pub(crate) use helpers::*; pub(crate) use helpers_32::*; pub(crate) use sanity::SideMetadataSanity; +/// Side metadata spec for VO bit. This is only available when the feature "vo_bit_access" is enabled. +/// Check the comments on "vo_bit_access" in `Cargo.toml` before use. Use at your own risk. #[cfg(feature = "vo_bit_access")] pub const VO_BIT_SIDE_METADATA_SPEC: SideMetadataSpec = crate::util::metadata::side_metadata::spec_defs::VO_BIT; diff --git a/src/util/metadata/vo_bit/mod.rs b/src/util/metadata/vo_bit/mod.rs index 80be56ea26..87982191d5 100644 --- a/src/util/metadata/vo_bit/mod.rs +++ b/src/util/metadata/vo_bit/mod.rs @@ -231,9 +231,15 @@ use crate::MMTK; /// Objects in the VM space are allocated/managed by the binding. This functio provides a way for /// the binding to set VO bit for an object in the space. #[cfg(feature = "vm_space")] -pub fn set_vo_bit_for_vm_space_object(mmtk: &'static MMTK, object: ObjectReference) { +pub fn set_vo_bit_for_vm_space_object( + mmtk: &'static MMTK, + object: ObjectReference, +) { use crate::policy::space::Space; - debug_assert!(mmtk.get_plan().base().vm_space.in_space(object), "{} is not in VM space", object); + debug_assert!( + mmtk.get_plan().base().vm_space.in_space(object), + "{} is not in VM space", + object + ); set_vo_bit(object); } -