Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EvictionChecker#checkFreeHeapPercentageEviction incorrectly calculates available memory #7599

shelley-jean-baker opened this issue Feb 24, 2016 · 0 comments


None yet
3 participants
Copy link

commented Feb 24, 2016

The FREE_HEAP_PERCENTAGE eviction policy does not work as documented because the EvictionChecker is incorrectly calculating available memory percentage in checkFreeHeapPercentageEviction. The method uses:

availableMemory / totalMemory

But it should likely be using:

availableMemory / maxMemory

With this calculation, it is possible for the calculated free heap percentage to be greater than 100.

This is occurring with Hazelcast 3.6.

@shelley-jean-baker shelley-jean-baker changed the title EvictionChecker#getAvailableMemory incorrectly calculates available memory EvictionChecker#checkFreeHeapPercentageEviction incorrectly calculates available memory Feb 24, 2016

@jerrinot jerrinot added this to the 3.7 milestone Feb 25, 2016

@ahmetmircik ahmetmircik modified the milestones: 3.6.2, 3.7 Mar 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.