Tag

Scavenger

0 views collected around this technical thread.

Tencent Technical Engineering
Tencent Technical Engineering
Mar 24, 2025 · Fundamentals

Understanding V8 Garbage Collection: Scavenger and Mark‑and‑Sweep Algorithms

V8’s garbage collector splits memory into young and old generations, using a fast Scavenger minor‑GC that marks live objects, evacuates them via semi‑space copying, and updates pointers with write barriers, while a concurrent mark‑and‑sweep major‑GC employs three‑color marking, black allocation, sweeping and optional parallel compaction, with adaptive triggering based on heap usage.

Garbage CollectionJavaScriptMark and Sweep
0 likes · 30 min read
Understanding V8 Garbage Collection: Scavenger and Mark‑and‑Sweep Algorithms