xerial / larray

Large off-heap arrays and mmap files for Scala and Java
Apache License 2.0
400 stars 43 forks source link

Will this project continue to be updated? #80

Open Mrhs121 opened 1 year ago

Mrhs121 commented 1 year ago

Will this bug continue to be fixed? #63

I have adopted his patch, but the error of 'requested array size exceeds vm limit' still occurs.

Looking forward to fixing this bug.

Mrhs121 commented 1 year ago

I'm alos trying to create huge array of Object:

val arr = LArray.of[AnyRef](10L + Integer.MAX_VALUE)

failed with exception:

Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    at scala.reflect.ManifestFactory$ObjectManifest.newArray(Manifest.scala:258)
    at scala.reflect.ManifestFactory$ObjectManifest.newArray(Manifest.scala:257)
    at xerial.larray.LObjectArrayLarge.$anonfun$array$1(LArray.scala:1150)
    at xerial.larray.LObjectArrayLarge$$Lambda$5/510113906.apply$mcVI$sp(Unknown Source)
    at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158)
    at xerial.larray.LObjectArrayLarge.<init>(LArray.scala:1148)
    at xerial.larray.LObjectArray$.ofDim(LArray.scala:1061)
    at xerial.larray.LArray$.of(LArray.scala:403)
    at org.example.App$.testBigArray(App.scala:42)
    at org.example.App$.main(App.scala:102)
    at org.example.App.main(App.scala)
gortiz commented 7 months ago

It seems the project is in a maintenance state and it looks to be difficult to create new versions. The author has been working in another similar project (see https://github.com/xerial/larray/issues/75#issuecomment-1327176483).

Anyway, for future readers, remember that Foreign Memory API (JEP 454) is production ready in Java 22 and AFAIK it covers all features from this library without needing to use JNI.