Hello.
Le jeu. 24 janv. 2019 à 08:23, Albretch Mueller <[email protected]> a écrit :
>
> I am "consistently" getting java.lang.OutOfMemoryError while trying
> to use DescriptiveStatistics.
>
> The files I am using are relatively large and I need to analyze the
> byte distributions in them. I am taking care of clearing the cash each
> time I run a new sample . . .
>
> I can't quite get why this is happening, when all you need are at the
> most 6 double variables which values you would incrementally update
> based on well-known formulas.
>
> Why would such OutOfMemoryError happen?
This caveat is mentioned in the documentation:
http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/stat/descriptive/DescriptiveStatistics.html
> Is there a way around that problem?
Yes; also mentioned in the above link.
HTH,
Gilles
>
> lbrtchx
> ~
> java.lang.OutOfMemoryError: Java heap space:
> DescriptiveStatistics.addValue() ...
>
> $ export JVM_ARGS="-Xms2048m -Xmx2048m"
>
> $ time(java -classpath "${CLASSPATH}" -Dfile.encoding=utf8 "${_KD}") >
> "${_LOG}" 2>&1
>
> $ tail -n 11 "${_LOG}"
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at
> org.apache.commons.math3.util.ResizableDoubleArray.expand(ResizableDoubleArray.java:697)
> at
> org.apache.commons.math3.util.ResizableDoubleArray.addElement(ResizableDoubleArray.java:442)
> at
> org.apache.commons.math3.stat.descriptive.DescriptiveStatistics.addValue(DescriptiveStatistics.java:171)
> at KByteInfo10DiffStats.setFfst(KByteInfo10DiffStats.java:80)
> at IOBytAr08.readBytes(IOBytAr08Test.java:310)
> at IOBytAr08Test.main(IOBytAr08Test.java:545)
>
> real 4m44.987s
> user 1m20.380s
> sys 3m28.568s
> $
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]