Stream: general

Topic: Question about heap management in WASM


view this post on Zulip Dennis Zhang (Jun 12 2024 at 14:29):

Dear Community,

I'm curious about how WebAssembly (WASM) handles malloc, as I didn't see the implementation of the brk syscall in wasi-libc. How is heap memory managed inside the WASM user space?

Best,

view this post on Zulip Joel Dice (Jun 12 2024 at 14:34):

The core WebAssembly spec has a memory.grow instruction for extending linear memory; that's what wasi-libc uses.

WASI libc implementation for WebAssembly. Contribute to WebAssembly/wasi-libc development by creating an account on GitHub.

Last updated: Oct 23 2024 at 20:03 UTC