Function mmtk::util::metadata::side_metadata::sanity::verify_update
source · pub fn verify_update<T: MetadataValue>(
metadata_spec: &SideMetadataSpec,
data_addr: Address,
old_val: T,
new_val: T
)
Expand description
Commits an update operation and ensures it returns the correct old side metadata content. Panics if: 1 - the metadata spec is not valid, 2 - the old side metadata content is not equal to the correct old content.
Arguments:
metadata_spec
: the metadata spec to verify the old content fordata_addr
: the address of the source dataold_val
: the expected old valuenew_val
: the new value the metadata should hold.