ComponentizeJS icon indicating copy to clipboard operation
ComponentizeJS copied to clipboard

Rooting array buffers

Open guybedford opened this issue 2 years ago • 1 comments

The current GC strategy is to just clear all allocations at the end of each call, but we need to allow the JS ArrayBuffers to hold on to the memory they expose. This likely involves integration into the JS GC to ensure it can become a managed pointer in the engine.

guybedford avatar Feb 20 '23 19:02 guybedford

This is still a very important issue to resolve. We need to properly integrate the cabi_post calls so that they free non-rooted data, and retain the rooted data structures. In the case of rooted data structures, the pointer is the target of the free call to integrate into the JS GC (zero-copy strings and typed arrays).

guybedford avatar Aug 20 '24 02:08 guybedford