I know that ZGC is still in an experimental phase, but recently I tried it out and it caused a memory leak.
here are the logs:
java.lang.OutOfMemoryError: Cannot allocate new LongPointer(1): totalBytes = 512, physicalBytes = 4146M
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:122)
at com.flow.app.lwjgl3.Lwjgl3Launcher.createApplication(Lwjgl3Launcher.java:33)
at com.flow.app.lwjgl3.Lwjgl3Launcher.main(Lwjgl3Launcher.java:19)
Caused by: java.lang.OutOfMemoryError: Cannot allocate new LongPointer(1): totalBytes = 512, physicalBytes = 4146M
at org.bytedeco.javacpp.LongPointer.<init>(LongPointer.java:88)
at org.bytedeco.javacpp.LongPointer.<init>(LongPointer.java:53)
at org.nd4j.linalg.cpu.nativecpu.ops.CpuOpContext.setIArguments(CpuOpContext.java:60)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.exec(NativeOpExecutioner.java:1558)
at org.nd4j.linalg.factory.Nd4j.exec(Nd4j.java:6566)
at org.nd4j.linalg.cpu.nativecpu.CpuNDArrayFactory.concat(CpuNDArrayFactory.java:579)
at org.nd4j.linalg.factory.Nd4j.concat(Nd4j.java:4857)
at org.nd4j.linalg.factory.BaseNDArrayFactory.vstack(BaseNDArrayFactory.java:983)
at org.nd4j.linalg.factory.Nd4j.vstack(Nd4j.java:4641)
at com.flow.vision.Preprocess.eulerAnglesToRotationMatrix(Preprocess.java:161)
at com.flow.app.StreamScreen.updateLanes(StreamScreen.java:129)
at com.flow.app.StreamScreen.render(StreamScreen.java:183)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:403)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:143)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:116)
... 2 more
Caused by: java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (4146M) > maxPhysicalBytes (4040M)
at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:700)
at org.bytedeco.javacpp.Pointer.init(Pointer.java:126)
at org.bytedeco.javacpp.LongPointer.allocateArray(Native Method)
at org.bytedeco.javacpp.LongPointer.<init>(LongPointer.java:80)
... 17 more
specs: windows 10, nd4j 1.0.0-M1
thanks!