Improving js.page_allocator
#2742
Kartoffelsaft
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current implementation of the allocator for WASM/JS seems extremely primitive. As it stands, it can only allocate and provides little to no functionality to free or reuse memory. Even then, most allocations immediately crash the program because it expects exact page sizes. This allocator can definitely be improved.
I've made my own allocator to use instead of this one for porting a project to web. It seems to be working quite well, supporting alloc/free/resize, so I'm curious if it'd be worth it to replace
js.page_allocator()
with my implementation? The code is a mess, so it'd have to be reworked a bit. It the first allocator I've ever made, but it's certainly better than what's in place now.Beta Was this translation helpful? Give feedback.
All reactions