From 4bb3027e91648607f34de23f3b01b8334e081385 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 14 Jun 2024 13:19:48 -0700 Subject: [PATCH] Update documentation for the change to PDO_MEMORY_CONFIG environment/build variable Signed-off-by: Mic Bowman --- common/interpreter/wawaka_wasm/README.md | 10 +++++----- docs/environment.md | 19 ++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) 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.