Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What would the GC scan? What do pointers look like? At the assembly layer, you have the flexibility to not have a C runtime (and therefore no C stack), and you might be doing fun things like having tagged pointers that the GC would have to know about.

In short, the WASM layer is IMO the wrong layer for GC. I think the closest-layered applicable solution is caching & pinning guarantees for common libraries, which may already be addressed by the same solutions for common JS libraries (use a common CDN & let the browser caching keep it pinned).



The GC would scan whatever the program told it to scan, by using its API, like the Boehm GC library: https://en.wikipedia.org/wiki/Boehm_garbage_collector

I think it only makes sense, seeing as interaction with the native JS VM will be inevitable for a long time.


Perhaps then you should just use the Boehm GC library then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: