larray icon indicating copy to clipboard operation
larray copied to clipboard

Will this project continue to be updated?

Open Mrhs121 opened this issue 1 year ago • 2 comments

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 avatar Oct 12 '23 16:10 Mrhs121

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)

Mrhs121 avatar Oct 12 '23 16:10 Mrhs121

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.

gortiz avatar Apr 08 '24 06:04 gortiz