Fixing .lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 995M

This can be resolved by increasing the heap size (e.g. -Xmx4G)

Caused by: java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 995M
        at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:576)
        at org.bytedeco.javacpp.Pointer.init(Pointer.java:121)
        at org.bytedeco.javacpp.PointerPointer.allocateArray(Native Method)
        at org.bytedeco.javacpp.PointerPointer.(PointerPointer.java:118)
        at org.nd4j.linalg.jcublas.rng.CudaNativeRandom.getExtraPointers(CudaNativeRandom.java:44)
        at org.nd4j.linalg.jcublas.rng.CudaNativeRandom.init(CudaNativeRandom.java:36)
        at org.nd4j.rng.NativeRandom.(NativeRandom.java:79)
        at org.nd4j.linalg.jcublas.rng.CudaNativeRandom.(CudaNativeRandom.java:31)
        at org.nd4j.linalg.jcublas.rng.CudaNativeRandom.(CudaNativeRandom.java:27)
        at org.nd4j.linalg.jcublas.rng.CudaNativeRandom.(CudaNativeRandom.java:23)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

One Reply to “Fixing .lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 995M”

Leave a Reply

Your email address will not be published. Required fields are marked *