# Using Different Size Pools in Ruby Garbage Collection

DevFeed: [Using Different Size Pools in Ruby Garbage Collection](<https://devfeed.tech/articles/using-different-size-pools-31810.md>)

Original publisher: [Read original article](<https://patshaughnessy.net/2025/2/11/using-different-size-pools>)

Author: Pat Shaughnessy

Published: 2025-02-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Pat Shaughnessy](<https://devfeed.tech/sources/pat-shaughnessy.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [gc](<https://devfeed.tech/tags/gc.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [updating-ruby-under-a-microscope](<https://devfeed.tech/tags/updating-ruby-under-a-microscope.md>)

## AI overview

An excerpt from an updated Ruby garbage-collection chapter explains how to use GC.stat_heap in Ruby 3.2 and later to inspect size-pool statistics while allocating arrays of different capacities.

## Source excerpt

I've started working on a new edition of Ruby Under a Microscope that covers Ruby 3.x. I'm working on this in my spare time, so it will take a while. Leave a comment or drop me a line and I'll email you when it's finished. The Ruby team has done