malinjawi commented on PR #11553: URL: https://github.com/apache/incubator-gluten/pull/11553#issuecomment-3846837728
> Can you check whether we can simplify it by directly freeing `size` instead of `Math.min(getUsed(), size)`? Good catch! You're right about the check-then-act race in `repay()`. However, we can't remove `Math.min(getUsed(), size)` as it prevents over-freeing memory. I'll address the non-atomic operation in a follow-up PR by synchronizing `repay()`. This keeps the current PR focused on the critical ConcurrentModificationException fix. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
