Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
BRUG: Evolution of Ruby GC
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sergey Avseyev
October 03, 2013
Programming
1
290
BRUG: Evolution of Ruby GC
Sergey Avseyev
October 03, 2013
Tweet
Share
More Decks by Sergey Avseyev
See All by Sergey Avseyev
Couchbase Cluster: The Ruby SDK
avsej
1
96
Couchbase and Rails
avsej
3
1.4k
Other Decks in Programming
See All in Programming
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
120
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
480
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
200
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
710
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
370
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
660
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
CSC307 Lecture 15
javiergs
PRO
0
240
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
110
Windows on Ryzen and I
seosoft
0
250
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[SF Ruby Conf 2025] Rails X
palkan
2
820
Build your cross-platform service in a week with App Engine
jlugia
234
18k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
160
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
How to make the Groovebox
asonas
2
2k
Context Engineering - Making Every Token Count
addyosmani
9
740
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
What's in a price? How to price your products and services
michaelherold
247
13k
4 Signs Your Business is Dying
shpigford
187
22k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Transcript
Evolution of Ruby GC
alloca(3) void f1(int n) { int *r; r = alloca(n
* sizeof(int)); ... } int f2() { float x; f1(42); ... }
alloca(3) f2() void f1(int n) { int *r; r =
alloca(n * sizeof(int)); ... } int f2() { float x; f1(42); ... } float
alloca(3) f2() void f1(int n) { int *r; r =
alloca(n * sizeof(int)); ... } int f2() { float x; f1(42); ... } float f1(42) int *
alloca(3) f2() void f1(int n) { int *r; r =
alloca(n * sizeof(int)); ... } int f2() { float x; f1(42); ... } float f1(42) int[42] int *
alloca(3) f2() void f1(int n) { int *r; r =
alloca(n * sizeof(int)); ... } int f2() { float x; f1(42); ... } float
Reference Counting 1
Reference Counting 2
Reference Counting 1
Reference Counting 0
Reference Counting 1 1 Cycle!
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Copying GC Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Sweep Root Objects
Mark & Lazy Sweep: 1.9 heap free list NULL
Mark & Lazy Sweep: 1.9 heap free list
Mark & Lazy Sweep: 1.9 heap free list
Mark & Lazy Sweep: 1.9 heap free list NULL
Mark & Lazy Sweep: 1.9 heap free list NULL
Mark & Sweep: 2.0 Root Objects Bitmap
Generational GC: 2.1 Большинство либо умирают молодыми, либо выживают и
существуют достаточно долго
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects Minor GC: 1
Generational GC: 2.1 Root Objects
Generational GC: 2.1 Root Objects
Generational GC: 2.1 Root Objects Minor GC: 2
Generational GC: 2.1 Root Objects Minor GC: 2
Generational GC: 2.1 Root Objects Remember Set
Generational GC: 2.1 Root Objects Remember Set Major GC
Generational GC: 2.1 Root Objects Remember Set Major GC
Generational GC: 2.1 Root Objects Remember Set Major GC
Generational GC: 2.1 Root Objects Remember Set
Generational GC: 2.1 Old New
Generational GC: 2.1 Old New Write Barrier
Generational GC: 2.1 Root Objects Remember Set val = rb_str_new("foo");
RARRAY_PTR(ary)[0] = val;
Generational GC: 2.1 Root Objects Remember Set val = rb_str_new("foo");
RARRAY_PTR(ary)[0] = val;
Generational GC: 2.1 Root Objects Remember Set val = rb_str_new("foo");
RARRAY_PTR(ary)[0] = val;
Спасибо Вопросы?