---
title: "Oilpan library · V8"
description: "Oilpan, the trace-based C++ garbage collector originally built for Blink, has been extracted into a library hosted in V8 since v9.4 (enabled in Chromium M94) under the cppgc namespace."
url: "https://swe.quest/articles/oilpan-library-v8-a23ba3c3b59aeb1f"
canonical: "https://v8.dev/blog/oilpan-library"
source: "V8"
published: "2021-11-10"
difficulty: "hard"
kind: "Announcement"
reading_minutes: 5
tags: ["memory-management","runtimes","c-cpp","browsers"]
---

# Oilpan library · V8

A post on [V8](https://swe.quest/sources/v8.md), published 2021-11-10, 5 min read, Announcement. Original: [https://v8.dev/blog/oilpan-library](https://v8.dev/blog/oilpan-library)

## Summary

Oilpan, the trace-based C++ garbage collector originally built for Blink, has been extracted into a library hosted in V8 since v9.4 (enabled in Chromium M94) under the cppgc namespace. It marks precisely on the heap and conservatively on the native stack, supports concurrent/parallel marking and sweeping plus compaction, and can run stand-alone (as PDFium does for XFA) or as part of V8's unified JavaScript/C++ heap. Moving it out of Blink cut a ~30k-target build down to seconds for its 400+ unit tests, and V8 now steers embedders off the EmbedderHeapTracer API toward allocating C++ objects on an Oilpan heap attached to an Isolate.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)

## Prerequisites

- tracing garbage collection ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- C++ memory management ([easy posts on C & C++](https://swe.quest/tags/c-cpp.md?difficulty=easy))
- V8 embedding ([easy posts on Runtimes & VMs](https://swe.quest/tags/runtimes.md?difficulty=easy))

## Keywords

Oilpan, cppgc, V8, Blink, PDFium, EmbedderHeapTracer, Chromium

## Related posts

- [The V8 Sandbox](https://swe.quest/articles/the-v8-sandbox-705346b1934809ad.md): V8 · 2024-04-04 · Hard · 11 min read · Sandboxing & isolation, Runtimes & VMs, Memory safety, Browsers, Vulnerability research
  The V8 Sandbox is a lightweight, in-process software sandbox that isolates the V8 heap so memory corruption from engine bugs cannot spread to the rest of the renderer process.
- [V8 release v6.9 · V8](https://swe.quest/articles/v8-release-v6-9-v8-d0efd26e2594b2df.md): V8 · 2018-08-07 · Easy · 4 min read · Runtimes & VMs, JavaScript, Memory management, WebAssembly, Compilers
  V8 v6.9 embeds built-in functions directly into the binary on x64, so all Isolates share one copy instead of each holding up to 700 KB on its own heap.
- [Understanding Garbage Collection in JavaScriptCore From Scratch](https://swe.quest/articles/understanding-garbage-collection-in-javascriptcore-from-scratch-6bc19cc2aad39444.md): WebKit · 2022-07-29 · Hard · 52 min read · Memory management, Runtimes & VMs, JavaScript, Concurrency
  JavaScriptCore's garbage collector is non-compacting, generational and mostly concurrent, with heavy use of lock-free programming.
- [Celebrating 10 years of V8 · V8](https://swe.quest/articles/celebrating-10-years-of-v8-v8-26690aa14d628d44.md): V8 · 2018-09-11 · Easy · 9 min read · Runtimes & VMs, JavaScript, Compilers, Memory management, Performance engineering
  V8 grew over ten years from a secret project started in 2006 on a Danish farm into a JavaScript and WebAssembly engine supporting eight instruction sets, embedded by both Chrome and Node.js.
- [Debugging JavaScript Memory Leaks](https://swe.quest/articles/debugging-javascript-memory-leaks-440c20d303c4be9c.md): Bun · 2025-04-02 · Medium · 8 min read · Memory management, Debugging, JavaScript, Runtimes & VMs
  Bun implements V8's writeHeapSnapshot API, so heap snapshots can be loaded and diffed in Chrome DevTools, where a steadily growing Delta column reveals leaks. bun:jsc's heapStats also reports per-type object counts, including objects protected from GC.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
