Skip to content

Commit

Permalink
feat(EXC-1860): Increase Wasm64 heap size to 6 GiB (#3748)
Browse files Browse the repository at this point in the history
This PR increases the Wasm64 heap size to 6 GiB.
  • Loading branch information
alexandru-uta authored Feb 10, 2025
1 parent 070656f commit 19bf527
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rs/embedders/tests/wasmtime_embedder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,7 @@ fn large_wasm64_memory_allocation_test() {

let mut config = ic_config::embedders::Config::default();
config.feature_flags.wasm64 = FlagStatus::Enabled;
let max_heap_size_in_pages = config.max_wasm_memory_size.get() / WASM_PAGE_SIZE as u64;
let max_heap_size_in_pages = config.max_wasm64_memory_size.get() / WASM_PAGE_SIZE as u64;
let wat = format!(
r#"
(module
Expand Down
4 changes: 2 additions & 2 deletions rs/execution_environment/src/execution/install_code/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use ic_test_utilities_execution_environment::{
};
use ic_test_utilities_metrics::fetch_int_counter;
use ic_types::messages::MessageId;
use ic_types::{ingress::WasmResult, MAX_STABLE_MEMORY_IN_BYTES, MAX_WASM_MEMORY_IN_BYTES};
use ic_types::{ingress::WasmResult, MAX_MEMORY_ALLOCATION};
use ic_types_test_utils::ids::user_test_id;
use ic_types_test_utils::ids::{canister_test_id, subnet_test_id};
use ic_universal_canister::{call_args, wasm, UNIVERSAL_CANISTER_WASM};
Expand Down Expand Up @@ -91,7 +91,7 @@ fn install_code_fails_on_invalid_memory_allocation() {
assert_eq!(
format!(
"MemoryAllocation expected to be in the range [0..{}], got 18_446_744_073_709_551_615",
candid::Nat((MAX_STABLE_MEMORY_IN_BYTES + MAX_WASM_MEMORY_IN_BYTES).into())
candid::Nat(MAX_MEMORY_ALLOCATION.get().into())
),
err.description()
);
Expand Down
2 changes: 1 addition & 1 deletion rs/types/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ pub const MAX_WASM_MEMORY_IN_BYTES: u64 = 4 * GIB;
/// The upper limit on the Wasm64 canister memory size.
/// This constant is used by other crates to define other constants, that's why
/// it is public and `u64` (`NumBytes` cannot be used in const expressions).
pub const MAX_WASM64_MEMORY_IN_BYTES: u64 = 4 * GIB;
pub const MAX_WASM64_MEMORY_IN_BYTES: u64 = 6 * GIB;

const MIN_MEMORY_ALLOCATION: NumBytes = NumBytes::new(0);
pub const MAX_MEMORY_ALLOCATION: NumBytes =
Expand Down

0 comments on commit 19bf527

Please sign in to comment.