Skip to content

Conversation

jedisct1
Copy link
Contributor

The symbol was introduced in LLD 15.0.7, as a way to know how much memory can be allocated:

llvm/llvm-project@1095870

WebAssembly/wasi-libc#377

The symbol was introduced in LLD 15.0.7, as a way to know how
much memory can be allocated:

llvm/llvm-project@1095870
WebAssembly/wasi-libc#377
@Luukdegram
Copy link
Contributor

It would be nice if std's WasmPageAllocator would make use of the __heap_base and __heap_end symbols in the future to prevent unnecessary page allocations when there's still enough space left in the available memory. It would be safe to use those symbols as the linker will always ensure they are available. (I just implemented them in the in-house linker also, which should have a PR up tomorrow).

@jedisct1 jedisct1 enabled auto-merge (squash) January 12, 2023 11:24
@jedisct1
Copy link
Contributor Author

I just implemented them in the in-house linker also, which should have a PR up tomorrow

Hahah, I was about to ask you about that. Nice! 👍

@jedisct1 jedisct1 merged commit cbbf8c8 into ziglang:master Jan 12, 2023
@jedisct1 jedisct1 deleted the wasi-libc-heap_end branch January 12, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants