Setting the Heap Size
All of the JVM and JRuby options you’ll learn about in this chapter can be used with each of the frameworks discussed in this book. Some need to be defined in a different way depending on the platform, but those cases will be specifically called out. Despite the differences in how they’re defined, the underlying effects of these options will remain the same across frameworks.
When a JVM starts up, it reserves a chunk of system memory called the heap. Each time a new object is created in a JRuby program, the platform allocates a piece of heap memory for it, which is reserved until the GC decides to reclaim the object. At that time, the associated piece of memory is returned to the heap. This process is called dynamic memory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access