feat: use dedicated fiber for foreign finalizer stack to avoid allocation during GC

The finalizer fiber is pre-allocated in the VM and reused for each finalizer call, replacing the previous approach that used a raw stack pointer. This ensures no memory allocation occurs during garbage collection when finalizers are invoked. The change also properly resets the fiber after each finalizer call and updates the GC rooting to include the new fiber.
This commit is contained in:
Bob Nystrom
2015-12-28 05:43:08 +00:00
parent 633dbfeed1
commit 278d66bdc1
4 changed files with 26 additions and 20 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ test: debug
benchmark: release
@ $(MAKE) -f util/wren.mk test
@ ./util/benchmark.py $(suite)
@ ./util/benchmark.py -l wren $(suite)
# Generate the Wren site.
docs: