-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and document Emscripten link-time options #174
Conversation
Set INITIAL_HEAP=1MB and ALLOW_MEMORY_GROWTH=1 to reduce starting memory usage of plugins, but allow the heap to grow. Explicitly set STACK_SIZE (previously named TOTAL_STACK) to 1MiB. This is a middle ground between Emscripten's default value prior to 3.1.27 of 5MiB and its default value since then of 64KiB. Also add comments documenting the purpose of each link-time option. Signed-off-by: Michael Warres <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this PR forward? Please add the same link-time options to the Makefile:
Line 40 in a982ad0
em++ --no-entry -sSTANDALONE_WASM -sEXPORTED_FUNCTIONS=_malloc \ |
Signed-off-by: Michael Warres <[email protected]>
- Reduce STACK_SIZE to 256KB - Update Makefile to be in sync with Bazel build rule Signed-off-by: Michael Warres <[email protected]>
Done. PTAL again, thanks! |
- Remove STACK_SIZE override, and instead use Emscripten default of 64KB - Change INITIAL_HEAP to 64KB Signed-off-by: Michael Warres <[email protected]>
actions/cache@v1 is no longer supported: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down Signed-off-by: Michael Warres <[email protected]>
Signed-off-by: Michael Warres <[email protected]>
Updated to remove the explicit settings of STACK_SIZE (so default 64KB is used), and reduce INITIAL_HEAP to 64KB. PTAL again, thanks! |
Signed-off-by: Michael Warres <[email protected]>
Set INITIAL_HEAP=64KB and ALLOW_MEMORY_GROWTH=1 to reduce starting memory usage of plugins, but allow the heap to grow. Use default Emscripten STACK_SIZE of 64KB, see this emscripten-discuss thread for background behind that value.
Also add comments documenting the purpose of each link-time option.