diff --git a/common/interpreter/wawaka_wasm/README.md b/common/interpreter/wawaka_wasm/README.md index 91855386..52afb220 100644 --- a/common/interpreter/wawaka_wasm/README.md +++ b/common/interpreter/wawaka_wasm/README.md @@ -82,17 +82,17 @@ be adjusted depending on the requirements for a WASM contract: To facilitate configuring wawaka's memory, we provide three pre-defined memory configurations that meet most contract requirements: -- `SMALL`: 1MB WASM runtime memory pool (64KB stack, 768KB heap) -- `MEDIUM`: 2MB WASM runtime memory pool (256KB stack, 1.5MB heap) -- `LARGE`: 4MB WASM runtime memory pool (512KB stack, 3MB heap) +- `SMALL`: 4MB WASM runtime memory pool (512KB stack, 3MB heap) +- `MEDIUM`: 8MB WASM runtime memory pool (512KB stack, 7MB heap) +- `LARGE`: 16MB WASM runtime memory pool (512KB stack, 15MB heap) To use a specific memory configuration, set -the environment variable `WASM_MEM_CONFIG` (the default is the `MEDIUM` +the environment variable `PDO_MEMORY_CONFIG` (the default is the `MEDIUM` configuration) to build the wawaka interpreter with those memory settings: ```bash -export WASM_MEM_CONFIG=MEDIUM +export PDO_MEMORY_CONFIG=MEDIUM ``` Here are some tips for choosing the right wawaka memory configuration diff --git a/docs/environment.md b/docs/environment.md index 2625f1d6..abea80ed 100644 --- a/docs/environment.md +++ b/docs/environment.md @@ -107,19 +107,16 @@ The git submodule points to the latest tagged commit of [WAMR](https://github.co `WAMR-1.1.2`. -### `WASM_MEM_CONFIG` +### `PDO_MEMORY_CONFIG` (default: `MEDIUM`) -`WASM_MEM_CONFIG` indicates the memory configuration for the -WASM runtime: the runtime's global memory pool size, -the WASM module's heap size, and the size of module's -operand stack. -When the variable is set to `SMALL`, the runtime's global memory -pool size is set to 1MB. -If the variable is set to `MEDIUM`, the runtime's memory pool -size is set to 2MB. -When the variable is set to `LARGE`, the runtime's memory -pool size is set to 4MB. +`PDO_MEMORY_CONFIG` indicates the memory configuration for the enclave +and WASM runtime: the runtime's global memory pool size, the WASM +module's heap size, and the size of module's operand stack. When the +variable is set to `SMALL`, the runtime's global memory pool size is +set to 4MB. If the variable is set to `MEDIUM`, the runtime's memory +pool size is set to 8MB. When the variable is set to `LARGE`, the +runtime's memory pool size is set to 16MB.