lingfengcoder commented on PR #10021: URL: https://github.com/apache/dubbo/pull/10021#issuecomment-1147257091
> 我很困惑,为什么MemorySafeLinkedBlockingQueue#hasRemainedMemory()中要使用usage.getCommitted()与maxFreeMemory相比较。 MemoryLimitCalculator后面又提供了两个方法分别是calculate 和 defaultLimit都是和当前jvm commited内存的比例值相比较,这样可能更加科学一点, 而hasRemainedMemory()直接使用当前commited相比较(第78行),感觉并不能预防OOM。 我觉得也是有点问题,可用内存应该是 long available = usage.getMax() - usage.getUsed(); 吧 根据这个进行限制 而不是commit -- 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]
