javascriptcore-garbage-collector

Official

Deep dive into Bun's JavaScriptCore GC internals.

Authoroven-sh
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Bun developers and SREs need a reliable reference to JavaScriptCore's garbage collector (Riptide) as used by Bun. This guide explains GC models, root tracing, and the interactions between JS objects and native state to help diagnose memory-management bugs.

Core Features & Use Cases

  • Understand the non-moving, generational, parallel, mostly-concurrent GC design and how Eden vs Full GC affect performance.
  • Learn how root constraints, WriteBarrier, visitChildren, visitAdditionalChildren, and opaque roots keep objects alive across mutator and GC cycles.
  • Inspect and reason about weak references (JSC::Weak, WeakHandleOwner) and the JS↔native reference patterns (JSRef) used in Zig bindings.
  • Leverage HeapAnalyzer and analyzeHeap hooks to label and trace memory graphs for heap snapshots and debugging memory leaks.

Quick Start

Read this reference to quickly understand Bun's JSC GC behavior when debugging memory leaks and use-after-free scenarios.

Dependency Matrix

Required Modules

None required

Components

Standard package

šŸ’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: javascriptcore-garbage-collector
Download link: https://github.com/oven-sh/bun/archive/main.zip#javascriptcore-garbage-collector

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.