Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 5, 2024
1 parent 9b362e3 commit d0a295d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ wasmtime_option_group! {
/// Optimization level of generated code (0-2, s; default: 2)
pub opt_level: Option<wasmtime::OptLevel>,

/// Do not allow memories to grow beyond `-O memory-reservation`
/// Do not allow Wasm linear memories to move in the host process's
/// address space.
pub memory_may_move: Option<bool>,

/// Initial virtual memory allocation size for memories.
Expand Down
6 changes: 3 additions & 3 deletions crates/wasmtime/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ impl Config {
/// * Memory `$a` initially allocates 4 WebAssembly pages (256KiB) and can
/// grow up to 4GiB, the limit of the 32-bit index space.
/// * Memory `$b` initially allocates 4096 WebAssembly pages, but in this
/// case the page size is 1, so it's 4096 bytes. Memory can also grow no
/// case its page size is 1, so it's 4096 bytes. Memory can also grow no
/// further meaning that it will always be 4096 bytes.
/// * Memory `$c` is a 64-bit linear memory which starts with 640KiB of
/// memory and can theoretically grow up to 2^64 bytes, although most
Expand Down Expand Up @@ -1502,12 +1502,12 @@ impl Config {
///
/// * Modules can be compiled with static knowledge the base pointer of
/// linear memory never changes to enable optimizations such as
/// loop-invariant-code-motion (hosting the base pointer out of a loop).
/// loop invariant code motion (hoisting the base pointer out of a loop).
///
/// * Memories cannot grow in excess of their original allocation. This
/// means that [`Config::memory_reservation`] and
/// [`Config::memory_reservation_for_growth`] may need tuning to ensure
/// the memory work at runtime.
/// the memory configuration works at runtime.
///
/// The default value for this option is `true`.
pub fn memory_may_move(&mut self, enable: bool) -> &mut Self {
Expand Down

0 comments on commit d0a295d

Please sign in to comment.