densh on master
Scala 2.12 support and updated … Merge pull request #115 from lo… (compare)
@data
+ @variant
+ @embed
combo we’ve had before
malloc
is really slow compared to jvm’s gc and our own region allocator.
-Xmx3400m
to not throw OOM exception ? https://gist.github.com/l15k4/89d79c0acbf98f86904c190d35283f1f
scala.array
on heap and it should be Int.MaxValue
big, so smth. like -Xmx2300m
should suffice, right ?
scala.Array
everything should be off-heap
object Play extends App {
import scala.offheap
implicit val alloc = offheap.malloc
val arr = new scala.Array[offheap.Array[Int]](Int.MaxValue/4)
var counter = 0
while (counter < Int.MaxValue/4) Region { implicit alloc =>
arr(counter) == offheap.Array.fromArray("foobar".getBytes)
counter+=1
}
}
arr
anymore, because its elements have been deallocated right away
-Xmx
memory, right?