diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-21 11:45:50 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-21 11:46:47 +0100 |
commit | 2106dafd62822ba1af0f3c74a742756c969501f3 (patch) | |
tree | 443fd98c8b279edf7620e7b5e8bdfa2cd44a0754 /Base/home/anon/js | |
parent | bc002f807a122bcd91498f87b970671a2d38bbb8 (diff) | |
download | serenity-2106dafd62822ba1af0f3c74a742756c969501f3.zip |
LibJS: Delete fully-empty HeapBlocks after garbage collection
We now deallocate GC blocks when they are found to have no live cells
inside them.
Diffstat (limited to 'Base/home/anon/js')
-rw-r--r-- | Base/home/anon/js/gc-strings.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Base/home/anon/js/gc-strings.js b/Base/home/anon/js/gc-strings.js new file mode 100644 index 0000000000..39d5400817 --- /dev/null +++ b/Base/home/anon/js/gc-strings.js @@ -0,0 +1,8 @@ +function foo() { + var a = []; + for (var i = 0; i < 4000; ++i) { + a.push("string" + i); + } +} + +foo(); |