The Bug that Forced Me to Understand Memory Compaction
Offered By: Ruby Central via YouTube
Course Description
Overview
Dive into the intricacies of Ruby memory management in this 33-minute conference talk by Emily Giurleo at Ruby Central. Explore how a single bug report led to a deep understanding of heap allocation, garbage collection, and memory compaction in Ruby 2.7. Learn about the implementation of Ruby objects in C, the challenges of memory bloat, and the introduction of manual memory compaction. Discover the interplay between C extensions and garbage collection, including mark callbacks and compaction techniques. Follow along as Giurleo unravels the mystery behind a specific bug, presents the solution, and shares valuable insights gained from this investigative journey. Gain a comprehensive understanding of Ruby's memory management system and its evolution through this informative and engaging presentation.
Syllabus
Intro
BSON gem
Ruby heap
Allocating memory
Mark and sweep
The heap after GC
Reality check
Memory bloat
What I'd learned so far
Ruby objects in C
Declaring new Ruby types
Memory compaction and C extensions
Garbage collection and C extensions
Mark callbacks
Garbage collection with mark callback
Marking long-lived objects Extension VALUE greeting
Mark and pin
Elementary, my dear
The suspects
The culprit
The solution
Moving forward
rb_gc_mark_no_pin()
Compaction callback
What I learned
Sources
Summary
Taught by
Ruby Central
Related Courses
Web Application ArchitecturesUniversity of New Mexico via Coursera Ruby مدخل إلى برمجة مواقع الإنترنت باستخدام لغة
Rwaq (رواق) Rails with Active Record and Action Pack
Johns Hopkins University via Coursera Ruby on Rails: An Introduction
Johns Hopkins University via Coursera Ruby on Rails Web Services and Integration with MongoDB
Johns Hopkins University via Coursera