On Wed, 5 Mar 2025 21:34:09 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 > > Alexander Zuev has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge branch 'JDK-8350813' of https://github.com/azuev-java/jdk into > JDK-8350813 > - Add a treshold of 90% to avoid OOME because of the additional buffers > needed to process sound bank. > It will consume a lot of resources loading and rendering the sound bank > impacting background task that might fail because they do not have enough > memory - and that's while we know upfront that we will not be able to finish > with the rendering process. I think @azuev-java has a valid point here. It might be better to check if enough memory is available upfront rather than end up with OOME later on. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23814#issuecomment-2715816369