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. What is being done here in terms of calculations is imprecise, but the specific test here (comparring known to be required memory vs theoretically available memory) should prevent cases of almost certain OOME, without claiming that there will be no OOME if the test passes. That's it. Not perfect, because free memory can change in either direction. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/23814#pullrequestreview-2683418235