equal
deleted
inserted
replaced
1829 // The expansion of the virtual storage space was unsuccessful. |
1829 // The expansion of the virtual storage space was unsuccessful. |
1830 // Let's see if it was because we ran out of swap. |
1830 // Let's see if it was because we ran out of swap. |
1831 if (G1ExitOnExpansionFailure && |
1831 if (G1ExitOnExpansionFailure && |
1832 _g1_storage.uncommitted_size() >= aligned_expand_bytes) { |
1832 _g1_storage.uncommitted_size() >= aligned_expand_bytes) { |
1833 // We had head room... |
1833 // We had head room... |
1834 vm_exit_out_of_memory(aligned_expand_bytes, "G1 heap expansion"); |
1834 vm_exit_out_of_memory(aligned_expand_bytes, OOM_MMAP_ERROR, "G1 heap expansion"); |
1835 } |
1835 } |
1836 } |
1836 } |
1837 return successful; |
1837 return successful; |
1838 } |
1838 } |
1839 |
1839 |
3605 G1CollectedHeap::setup_surviving_young_words() { |
3605 G1CollectedHeap::setup_surviving_young_words() { |
3606 assert(_surviving_young_words == NULL, "pre-condition"); |
3606 assert(_surviving_young_words == NULL, "pre-condition"); |
3607 uint array_length = g1_policy()->young_cset_region_length(); |
3607 uint array_length = g1_policy()->young_cset_region_length(); |
3608 _surviving_young_words = NEW_C_HEAP_ARRAY(size_t, (size_t) array_length, mtGC); |
3608 _surviving_young_words = NEW_C_HEAP_ARRAY(size_t, (size_t) array_length, mtGC); |
3609 if (_surviving_young_words == NULL) { |
3609 if (_surviving_young_words == NULL) { |
3610 vm_exit_out_of_memory(sizeof(size_t) * array_length, |
3610 vm_exit_out_of_memory(sizeof(size_t) * array_length, OOM_MALLOC_ERROR, |
3611 "Not enough space for young surv words summary."); |
3611 "Not enough space for young surv words summary."); |
3612 } |
3612 } |
3613 memset(_surviving_young_words, 0, (size_t) array_length * sizeof(size_t)); |
3613 memset(_surviving_young_words, 0, (size_t) array_length * sizeof(size_t)); |
3614 #ifdef ASSERT |
3614 #ifdef ASSERT |
3615 for (uint i = 0; i < array_length; ++i) { |
3615 for (uint i = 0; i < array_length; ++i) { |
4388 uint array_length = PADDING_ELEM_NUM + |
4388 uint array_length = PADDING_ELEM_NUM + |
4389 real_length + |
4389 real_length + |
4390 PADDING_ELEM_NUM; |
4390 PADDING_ELEM_NUM; |
4391 _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length, mtGC); |
4391 _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length, mtGC); |
4392 if (_surviving_young_words_base == NULL) |
4392 if (_surviving_young_words_base == NULL) |
4393 vm_exit_out_of_memory(array_length * sizeof(size_t), |
4393 vm_exit_out_of_memory(array_length * sizeof(size_t), OOM_MALLOC_ERROR, |
4394 "Not enough space for young surv histo."); |
4394 "Not enough space for young surv histo."); |
4395 _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; |
4395 _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; |
4396 memset(_surviving_young_words, 0, (size_t) real_length * sizeof(size_t)); |
4396 memset(_surviving_young_words, 0, (size_t) real_length * sizeof(size_t)); |
4397 |
4397 |
4398 _alloc_buffers[GCAllocForSurvived] = &_surviving_alloc_buffer; |
4398 _alloc_buffers[GCAllocForSurvived] = &_surviving_alloc_buffer; |