Skip to content

Commit

Permalink
Update documentation for the change to PDO_MEMORY_CONFIG environment/…
Browse files Browse the repository at this point in the history
…build variable

Signed-off-by: Mic Bowman <[email protected]>
  • Loading branch information
cmickeyb authored and bvavala committed Jun 17, 2024
1 parent 70bf620 commit 4bb3027
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
10 changes: 5 additions & 5 deletions common/interpreter/wawaka_wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 8 additions & 11 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- -------------------------------------------------- -->
<!-- -------------------------------------------------- -->
Expand Down

0 comments on commit 4bb3027

Please sign in to comment.