Skip to content

Commit

Permalink
Make memset visible only to the crate
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Nov 28, 2024
1 parent abe964e commit f7f1d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub fn set_dirty<M: Memory>(memory: &mut M, page_indices: &(u64, u64)) -> Result

// Keep this in a central place to allow for future optimization
#[inline(always)]
pub fn memset(slice: &mut [u8], value: u8) {
pub(crate) fn memset(slice: &mut [u8], value: u8) {
let p = slice.as_mut_ptr();
unsafe {
ptr::write_bytes(p, value, slice.len());
Expand Down

0 comments on commit f7f1d85

Please sign in to comment.