Created
January 24, 2017 18:20
-
-
Save l15k4/10bc72db6bda91ee42b29708fb767094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
counter+=1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you run this with
-Xmx4096
it crashes withjava.lang.OutOfMemoryError: GC overhead limit exceeded