[llvm-bugs] [Bug 35544] New: Wasm: add new weak global symbol "__stack_top"
llvm-bugs at lists.llvm.org
Wed Dec 6 04:32:35 PST 2017
Bug ID: 35544
Summary: Wasm: add new weak global symbol "__stack_top"
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: ncw at realvnc.com
CC: llvm-bugs at lists.llvm.org
Could we add a new symbol to those provided by LLD? It should be a weak global
integer called "__stack_top" and point to the end of the stack region, as
calculated in Writer::layoutMemory.
This would be useful in Musl. Currently, when malloc needs to provide fresh
pages of memory to the Wasm module, all it knows initially is the size of the
allocated region from "__builtin_wasm_current_memory". However, the Wasm page
size is large (64KiB) so potentially 64KiB of memory at the end of the current
page is unused.
It would nice if malloc could start allocating its data right from the top of
the stack, instead of wasting space by beginning from the next Wasm page.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs