How Ruby Uses Memory

While everything about constants is important, nobody would on purpose create a constant containing a dozillion strings. There is another pitfall with ruby memory management, though. It addresses to RVALUEs and how ruby internally allocates memory in internal heaps.
In general, whether one creates an object that requires less than 23 bytes, it’s being stored in internal heap. These heaps are never returned to OS during a process run.
More details: http://rocket-science.ru/hacking/2013/12/17/ruby-memory-pitfalls/