[M6] --sMAXIMUM_MEMORY has a double-dash typo (and no memory growth) #27

Open
opened 2026-06-27 03:54:47 +00:00 by sessamekesh · 1 comment
Owner

File: wasm/CMakeLists.txt:78

"--sMAXIMUM_MEMORY=1073741824"

should be -sMAXIMUM_MEMORY=... (compare the correct -sINITIAL_MEMORY on line 77). As written, emcc treats --sMAXIMUM_MEMORY as an unknown --s… driver flag.

Separately, MAXIMUM_MEMORY is only meaningful alongside -sALLOW_MEMORY_GROWTH, which is not set — so the heap is fixed at INITIAL_MEMORY (16 MiB) and the cap is inert regardless.

Fix: decide intent — either drop the line, or fix the flag and add -sALLOW_MEMORY_GROWTH.


Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the various-cleanup branch.

**File:** `wasm/CMakeLists.txt:78` ```cmake "--sMAXIMUM_MEMORY=1073741824" ``` should be `-sMAXIMUM_MEMORY=...` (compare the correct `-sINITIAL_MEMORY` on line 77). As written, emcc treats `--sMAXIMUM_MEMORY` as an unknown `--s…` driver flag. Separately, `MAXIMUM_MEMORY` is only meaningful alongside `-sALLOW_MEMORY_GROWTH`, which is not set — so the heap is fixed at `INITIAL_MEMORY` (16 MiB) and the cap is inert regardless. **Fix:** decide intent — either drop the line, or fix the flag *and* add `-sALLOW_MEMORY_GROWTH`. --- _Filed by an automated AI code review (manual proof-of-concept run). Code locations reference the `various-cleanup` branch._
Author
Owner

This one requires some thought, removing ALLOW_MEMORY_GROWTH was part of a perf improvement story. It can be added back and be correct, but the "correct" decision here takes thought.

This one requires some thought, removing `ALLOW_MEMORY_GROWTH` was part of a perf improvement story. It can be added back and be correct, but the "correct" decision here takes thought.
Sign in to join this conversation.
No description provided.