Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/runtime_init_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ function initMemory() {
} else
#endif
{
#if MINIMAL_RUNTIME
var INITIAL_MEMORY = {{{ INITIAL_MEMORY }}};
#else
var INITIAL_MEMORY = {{{ makeModuleReceiveExpr('INITIAL_MEMORY', INITIAL_MEMORY) }}};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The makeModuleReceiveExpr macro already takes care of this I think.

IIRC, MINIMAL_RUNTIME sets INCOMING_MODULE_JS_API to empty by default which should make this expand to just INITIAL_MEMORY

#endif

#if ASSERTIONS
assert(INITIAL_MEMORY >= {{{STACK_SIZE}}}, 'INITIAL_MEMORY should be larger than STACK_SIZE, was ' + INITIAL_MEMORY + '! (STACK_SIZE=' + {{{STACK_SIZE}}} + ')');
Expand Down