58 return r != NULL && r->in_collection_set(); |
58 return r != NULL && r->in_collection_set(); |
59 } |
59 } |
60 |
60 |
61 inline HeapWord* |
61 inline HeapWord* |
62 G1CollectedHeap::attempt_allocation(size_t word_size, |
62 G1CollectedHeap::attempt_allocation(size_t word_size, |
63 unsigned int* gc_count_before_ret) { |
63 unsigned int* gc_count_before_ret, |
|
64 int* gclocker_retry_count_ret) { |
64 assert_heap_not_locked_and_not_at_safepoint(); |
65 assert_heap_not_locked_and_not_at_safepoint(); |
65 assert(!isHumongous(word_size), "attempt_allocation() should not " |
66 assert(!isHumongous(word_size), "attempt_allocation() should not " |
66 "be called for humongous allocation requests"); |
67 "be called for humongous allocation requests"); |
67 |
68 |
68 HeapWord* result = _mutator_alloc_region.attempt_allocation(word_size, |
69 HeapWord* result = _mutator_alloc_region.attempt_allocation(word_size, |
69 false /* bot_updates */); |
70 false /* bot_updates */); |
70 if (result == NULL) { |
71 if (result == NULL) { |
71 result = attempt_allocation_slow(word_size, gc_count_before_ret); |
72 result = attempt_allocation_slow(word_size, |
|
73 gc_count_before_ret, |
|
74 gclocker_retry_count_ret); |
72 } |
75 } |
73 assert_heap_not_locked(); |
76 assert_heap_not_locked(); |
74 if (result != NULL) { |
77 if (result != NULL) { |
75 dirty_young_block(result, word_size); |
78 dirty_young_block(result, word_size); |
76 } |
79 } |