Skip to content

Instantly share code, notes, and snippets.

Created Jan 24, 2017
What would you like to do?
object Play extends App {
implicit val alloc = offheap.malloc
val arr = new scala.Array[offheap.Array[Byte]](Int.MaxValue/8)
var counter = 0
while (counter < Int.MaxValue/8) {
arr(counter) = offheap.Array.fromArray("foobar".getBytes)
Copy link

l15k4 commented Jan 24, 2017

If you run this with -Xmx4096 it crashes with java.lang.OutOfMemoryError: GC overhead limit exceeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment