Skip to content

Commit 21477c7

Browse files
authored
move most of runtime/vm/cow.rs over to aligned byte counts (#9652)
* move most of runtime/vm/cow.rs over to aligned byte counts As part of attempting to move some of these operations over to Mmap instances, it is nice to have type-level checking for aligned sizes. In upcoming PRs, APIs like `map_at` will be switched to using `Mmap` instances with aligned counts. There are a couple of spots where I have questions -- will flag them in review comments. * address review comments, incl workaround for #9660
1 parent 6bc7c44 commit 21477c7

File tree

4 files changed

+184
-103
lines changed

4 files changed

+184
-103
lines changed

crates/wasmtime/src/runtime/vm.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,6 @@ pub fn host_page_size() -> usize {
367367
};
368368
}
369369

370-
/// Is `bytes` a multiple of the host page size?
371-
///
372-
/// (Deprecated: consider switching to `HostAlignedByteCount`.)
373-
#[cfg(feature = "signals-based-traps")]
374-
pub fn usize_is_multiple_of_host_page_size(bytes: usize) -> bool {
375-
bytes % host_page_size() == 0
376-
}
377-
378370
/// Round the given byte size up to a multiple of the host OS page size.
379371
///
380372
/// Returns an error if rounding up overflows.

0 commit comments

Comments
 (0)