On Wed, 26 Feb 2025 22:26:48 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:
> - Check that the calculated audio data size does not exceed available heap > memory before committing to the rendering > - Add a test case src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java line 93: > 91: } > 92: > 93: long maximumHeapSize = Runtime.getRuntime().maxMemory() - The test program does not contain any "real" large data, so it should not run into an OutOfMemoryError from the start. Note that after the current patch, the code may still allocate a huge chunk of memory on large systems just by processing a small soundbank which is not good. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1977872436