5 ms·
Garbage collection is not magic. It's a fairly simple (but byzantine) matter of tracking references, and allocating and freeing memory. Why would this be so muc
by sspiff 10y ago
Garbage collection is not magic. It's a fairly simple (but byzantine) matter of tracking references, and allocating and freeing memory. Why would this be so much harder for WebAssembly? Why can't existing garbage collectors be compiled to WA?
- chrisseaton 10y ago> Why can't existing garbage collectors be compiled to WA? Yes I think that's the idea.
- sspiff 10y agoExactly. From what I've seen of WebAsm, you can request pages of memory using grow_memory. Upon this, you could implement a memory pool system to handle malloc and free. Using this, it is trivial to port existing GC's. I don't understand why people moan about GC in WebAsm. WebAsm is a compiler target for lower level languages, not the JVM.