Skip to content
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

Maximum size of WASM module #1

Open
jiayihu opened this issue Nov 26, 2020 · 0 comments
Open

Maximum size of WASM module #1

jiayihu opened this issue Nov 26, 2020 · 0 comments
Projects

Comments

@jiayihu
Copy link
Owner

jiayihu commented Nov 26, 2020

The WASM standard defines memory pages of 64KB so at least 1 must be supported. At the same time it cannot support more than 1 in STM32F407 where at most 128KB of RAM is available.

Memory estimates are:

  • 4KB reserved for the system runtime stack
  • The rest is heap:
    • 64KB for the module memory
    • 4KB for the WASM value stack, also called operand stack
    • The remaining must be used to receive the WASM module from the UDP socket and for parsing the module

A possible solution is to move the stack to CCRAM, where additional 64KB are available. In that case UDP socket buffer can also be moved to the stack, allocating a static buffer with sufficient upper bound.

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Agenda
Backlog
Development

No branches or pull requests

1 participant