You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your setup creates 100,000 objects, each of which is 1000 bytes + overhead. Then, your benchmark creates a new 10,009 byte string for each row, and then collects them all into an array of 100k 10kb entries (1GB + substantial overhead), then attempts to join them together into one giant string which will require an additional whopping 1,000,999,999 bytes, without considering overhead.
This isn't a leak - this is just requesting more memory than you've allocated to the JVM. Running this under MRI requires about 3GB of RAM. MRI doesn't have explicit limits like the JVM does, and will happily continue allocating memory until your machine grinds into a swapping heap of rubble. If you want to perform operations that require large amounts of allocated RAM, you'll need to provide sufficient memory to the JVM.
This algorithm runs perfect with ruby 2.2.0 but with jruby 1.7.16 I got memory leaks until I put the memory to 4GBs
The text was updated successfully, but these errors were encountered: