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 ...

Get Deploying with JRuby 9k now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.