2009 // We will double the existing space, or take |
2009 // We will double the existing space, or take |
2010 // G1ExpandByPercentOfAvailable % of the available expansion |
2010 // G1ExpandByPercentOfAvailable % of the available expansion |
2011 // space, whichever is smaller, bounded below by a minimum |
2011 // space, whichever is smaller, bounded below by a minimum |
2012 // expansion (unless that's all that's left.) |
2012 // expansion (unless that's all that's left.) |
2013 const size_t min_expand_bytes = 1*M; |
2013 const size_t min_expand_bytes = 1*M; |
2014 size_t reserved_bytes = _g1->g1_reserved_obj_bytes(); |
2014 size_t reserved_bytes = _g1->max_capacity(); |
2015 size_t committed_bytes = _g1->capacity(); |
2015 size_t committed_bytes = _g1->capacity(); |
2016 size_t uncommitted_bytes = reserved_bytes - committed_bytes; |
2016 size_t uncommitted_bytes = reserved_bytes - committed_bytes; |
2017 size_t expand_bytes; |
2017 size_t expand_bytes; |
2018 size_t expand_bytes_via_pct = |
2018 size_t expand_bytes_via_pct = |
2019 uncommitted_bytes * G1ExpandByPercentOfAvailable / 100; |
2019 uncommitted_bytes * G1ExpandByPercentOfAvailable / 100; |