We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42ab8fc commit 7d7fc69Copy full SHA for 7d7fc69
src/hotspot/os/bsd/os_bsd.cpp
@@ -154,7 +154,8 @@ julong os::Bsd::available_memory() {
154
assert(kerr == KERN_SUCCESS,
155
"host_statistics64 failed - check mach_host_self() and count");
156
if (kerr == KERN_SUCCESS) {
157
- available = vmstat.free_count * os::vm_page_size();
+ // free_count is just a lowerbound, other page categories can be freed too and make memory available
158
+ available = (vmstat.free_count + vmstat.inactive_count + vmstat.purgeable_count) * os::vm_page_size();
159
}
160
#endif
161
return available;
0 commit comments