mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibJS: Use a work queue instead of the C++ stack for the GC mark phase
This fixes an issue where we'd run out of C++ stack while traversing large GC heap graphs.
This commit is contained in:
parent
5dcc58d54a
commit
7826cb2556
Notes:
sideshowbarker
2024-07-17 03:14:39 +09:00
Author: https://github.com/awesomekling
Commit: 7826cb2556
Pull-request: https://github.com/SerenityOS/serenity/pull/16950
Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 30 additions and 5 deletions
|
@ -0,0 +1,11 @@
|
|||
test("garbage collection of a deeply-nested object graph", () => {
|
||||
let root = {};
|
||||
let o = root;
|
||||
|
||||
for (let i = 0; i < 200_000; ++i) {
|
||||
o.next = {};
|
||||
o = o.next;
|
||||
}
|
||||
|
||||
gc();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue