javascriptcore-garbage-collector
OfficialDeep dive into Bun's JavaScriptCore GC internals.
Software Engineering#debugging#bun#memory-management#gc#javascriptcore#weak-references#heap-analysis
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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.