~/talk

Pointers for Eliminating Heaps of Memory

Talkat RubyConf 2018 · 2018-11-28..11-30· [ruby]
slides:none on file

Covers concrete changes in Ruby 2.6: uses Malloc Stack Logging on macOS to find where mallocs come from, patches the loaded_features cache to share and eliminate string allocations (about 50% fewer string allocations for one example) and replaces the instruction-sequence mark array with Direct ISeq Marking, cutting boot-time array allocations from ~35k to ~8.5k (≈34% fewer objects) and reducing overall process memory ~4–6% depending on how many files an app loads.

AI-written summary · about

  1. 0:00Start
  2. 7:36Malloc Stack Logging
  3. 8:23Dump Malloc Logs
  4. 8:49Log File Size
  5. 8:59File Contents
  6. 9:20Reconciling Live Memory
  7. 14:22Cache Structure
  8. 14:41Generation Algorithm
  9. 14:56Key Generation
  10. 18:27Output
  11. 18:58Malloc Logging
  12. 21:42Stack VM
  13. 22:59Processing Phases
  14. 25:43Optimization Pass
  15. 26:13Byte Code Translation
  16. 27:55Hello World
  17. 29:16VM Implementation
  18. 30:48Object Allocations
  19. 32:18ISeq Layout
  20. 37:21Basic Rails App
  21. 37:53Process Memory: -6%
  22. 38:23Actual Code
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.