< prev index next >

src/hotspot/share/gc/z/zDirector.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 184,194 **** // the heap reserve is not available to Java threads and is therefore not // considered part of the free memory. const size_t max_capacity = ZHeap::heap()->soft_max_capacity(); const size_t max_reserve = ZHeap::heap()->max_reserve(); const size_t used = ZHeap::heap()->used(); ! const size_t free_with_reserve = max_capacity - used; const size_t free = free_with_reserve - MIN2(free_with_reserve, max_reserve); const double free_percent = percent_of(free, max_capacity); log_debug(gc, director)("Rule: High Usage, Free: " SIZE_FORMAT "MB(%.1f%%)", free / M, free_percent); --- 184,194 ---- // the heap reserve is not available to Java threads and is therefore not // considered part of the free memory. const size_t max_capacity = ZHeap::heap()->soft_max_capacity(); const size_t max_reserve = ZHeap::heap()->max_reserve(); const size_t used = ZHeap::heap()->used(); ! const size_t free_with_reserve = max_capacity - MIN2(max_capacity, used); const size_t free = free_with_reserve - MIN2(free_with_reserve, max_reserve); const double free_percent = percent_of(free, max_capacity); log_debug(gc, director)("Rule: High Usage, Free: " SIZE_FORMAT "MB(%.1f%%)", free / M, free_percent);
< prev index next >