Title: Make initial size of interpreter stacks configurable · Issue #43 · explodingcamera/tinywasm · GitHub
Open Graph Title: Make initial size of interpreter stacks configurable · Issue #43 · explodingcamera/tinywasm
X Title: Make initial size of interpreter stacks configurable · Issue #43 · explodingcamera/tinywasm
Description: Description Currently, the TinyWasm interpreter pre-allocates a fixed/hardcoded amount of memory for its stacks. While this works well in general-purpose environments, it poses challenges for constrained targets—particularly embedded sys...
Open Graph Description: Description Currently, the TinyWasm interpreter pre-allocates a fixed/hardcoded amount of memory for its stacks. While this works well in general-purpose environments, it poses challenges for const...
X Description: Description Currently, the TinyWasm interpreter pre-allocates a fixed/hardcoded amount of memory for its stacks. While this works well in general-purpose environments, it poses challenges for const...
Opengraph URL: https://github.com/explodingcamera/tinywasm/issues/43
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make initial size of interpreter stacks configurable","articleBody":"# Description\n\nCurrently, the TinyWasm interpreter pre-allocates a fixed/hardcoded amount of memory for its stacks. While this works well in general-purpose environments, it poses challenges for constrained targets—particularly embedded systems.\n\nConcretely, I had the problem of not being able to run tw on an nrf53 due to OOM panics, until I reduced the initial size of the interpreter stacks.\n\nThis issue proposes making the interpreter's value stack size configurable by the user. This would:\n\n- Allow embedded developers to tune memory usage based on available resources.\n- Enable to address scenarios where the characteristics of the Wasm modules relevant for the target are known ahead of time (e.g., if they use only 32-bit values) by optimizing the pre-allocated stacks to the expected program type.\n\nThe proposed change is backward-compatible and would not affect users who rely on the default stack size.\n\nNote that this does not remedy the problem described in #42 : The stacks still grow dynamically and a Wasm module requiring enough memory on the interpreter side can still crash the program via an OOM panic.","author":{"url":"https://github.com/FedorSmirnov89","@type":"Person","name":"FedorSmirnov89"},"datePublished":"2025-07-12T07:44:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/43/tinywasm/issues/43"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9251c054-48e5-3950-27bc-07840432e65c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B24:1A3A28:9E9B656:CD715E5:6976267E |
| html-safe-nonce | 6827ac8debbdbb5a7d8d2209114c63c412b7c1587d32526ecf42182c13dc96f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjI0OjFBM0EyODo5RTlCNjU2OkNENzE1RTU6Njk3NjI2N0UiLCJ2aXNpdG9yX2lkIjoiMzQ1NzcwOTgyMTk0NTg0OTQ3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 08be14911f47e1603f17cb99907ffd48e85253805b66640ba611c34cefed669b |
| hovercard-subject-tag | issue:3225004323 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/explodingcamera/tinywasm/43/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ecec7f8e9bde2f428a7e4aa2fe801969104ac6f31f3dbdb3db61260e6aee5877/explodingcamera/tinywasm/issues/43 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ecec7f8e9bde2f428a7e4aa2fe801969104ac6f31f3dbdb3db61260e6aee5877/explodingcamera/tinywasm/issues/43 |
| og:image:alt | Description Currently, the TinyWasm interpreter pre-allocates a fixed/hardcoded amount of memory for its stacks. While this works well in general-purpose environments, it poses challenges for const... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FedorSmirnov89 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/explodingcamera/tinywasm git https://github.com/explodingcamera/tinywasm.git |
| octolytics-dimension-user_id | 10697536 |
| octolytics-dimension-user_login | explodingcamera |
| octolytics-dimension-repository_id | 721699855 |
| octolytics-dimension-repository_nwo | explodingcamera/tinywasm |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 721699855 |
| octolytics-dimension-repository_network_root_nwo | explodingcamera/tinywasm |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width