Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/defNewGeneration.cpp @ 13060:8f07aa079343
8016309: assert(eden_size > 0 && survivor_size > 0) failed: just checking
7057939: jmap shows MaxNewSize=4GB when Java is using parallel collector
Summary: Major cleanup of the collectorpolicy classes
Reviewed-by: tschatzl, jcoomes
author | jwilhelm |
---|---|
date | Fri, 01 Nov 2013 17:09:38 +0100 |
parents | 330dfb0476f4 |
children | 86e6d691f2e1 |
comparison
equal
deleted
inserted
replaced
13059:46d7652b223c | 13060:8f07aa079343 |
---|---|
202 vm_exit_during_initialization("Could not allocate a new gen space"); | 202 vm_exit_during_initialization("Could not allocate a new gen space"); |
203 | 203 |
204 // Compute the maximum eden and survivor space sizes. These sizes | 204 // Compute the maximum eden and survivor space sizes. These sizes |
205 // are computed assuming the entire reserved space is committed. | 205 // are computed assuming the entire reserved space is committed. |
206 // These values are exported as performance counters. | 206 // These values are exported as performance counters. |
207 uintx alignment = GenCollectedHeap::heap()->collector_policy()->min_alignment(); | 207 uintx alignment = GenCollectedHeap::heap()->collector_policy()->space_alignment(); |
208 uintx size = _virtual_space.reserved_size(); | 208 uintx size = _virtual_space.reserved_size(); |
209 _max_survivor_size = compute_survivor_size(size, alignment); | 209 _max_survivor_size = compute_survivor_size(size, alignment); |
210 _max_eden_size = size - (2*_max_survivor_size); | 210 _max_eden_size = size - (2*_max_survivor_size); |
211 | 211 |
212 // allocate the performance counters | 212 // allocate the performance counters |
233 | 233 |
234 void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size, | 234 void DefNewGeneration::compute_space_boundaries(uintx minimum_eden_size, |
235 bool clear_space, | 235 bool clear_space, |
236 bool mangle_space) { | 236 bool mangle_space) { |
237 uintx alignment = | 237 uintx alignment = |
238 GenCollectedHeap::heap()->collector_policy()->min_alignment(); | 238 GenCollectedHeap::heap()->collector_policy()->space_alignment(); |
239 | 239 |
240 // If the spaces are being cleared (only done at heap initialization | 240 // If the spaces are being cleared (only done at heap initialization |
241 // currently), the survivor spaces need not be empty. | 241 // currently), the survivor spaces need not be empty. |
242 // Otherwise, no care is taken for used areas in the survivor spaces | 242 // Otherwise, no care is taken for used areas in the survivor spaces |
243 // so check. | 243 // so check. |
471 return eden()->free() | 471 return eden()->free() |
472 + from()->free(); // to() is only used during scavenge | 472 + from()->free(); // to() is only used during scavenge |
473 } | 473 } |
474 | 474 |
475 size_t DefNewGeneration::max_capacity() const { | 475 size_t DefNewGeneration::max_capacity() const { |
476 const size_t alignment = GenCollectedHeap::heap()->collector_policy()->min_alignment(); | 476 const size_t alignment = GenCollectedHeap::heap()->collector_policy()->space_alignment(); |
477 const size_t reserved_bytes = reserved().byte_size(); | 477 const size_t reserved_bytes = reserved().byte_size(); |
478 return reserved_bytes - compute_survivor_size(reserved_bytes, alignment); | 478 return reserved_bytes - compute_survivor_size(reserved_bytes, alignment); |
479 } | 479 } |
480 | 480 |
481 size_t DefNewGeneration::unsafe_max_alloc_nogc() const { | 481 size_t DefNewGeneration::unsafe_max_alloc_nogc() const { |