Skip to content

Commit

Permalink
cargo fmt/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon committed Dec 5, 2024
1 parent 021a01d commit 21d008c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/util/metadata/side_metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
12 changes: 9 additions & 3 deletions src/util/metadata/vo_bit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<VM: VMBinding>(mmtk: &'static MMTK<VM>, object: ObjectReference) {
pub fn set_vo_bit_for_vm_space_object<VM: VMBinding>(
mmtk: &'static MMTK<VM>,
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);
}

0 comments on commit 21d008c

Please sign in to comment.