equal
deleted
inserted
replaced
155 } |
155 } |
156 } |
156 } |
157 |
157 |
158 size_t G1Allocator::used_in_alloc_regions() { |
158 size_t G1Allocator::used_in_alloc_regions() { |
159 assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf."); |
159 assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf."); |
160 size_t result = 0; |
160 return mutator_alloc_region()->used_in_alloc_regions(); |
161 |
|
162 // Read only once in case it is set to NULL concurrently |
|
163 HeapRegion* hr = mutator_alloc_region()->get(); |
|
164 if (hr != NULL) { |
|
165 result += hr->used(); |
|
166 } |
|
167 return result; |
|
168 } |
161 } |
169 |
162 |
170 |
163 |
171 HeapWord* G1Allocator::par_allocate_during_gc(InCSetState dest, |
164 HeapWord* G1Allocator::par_allocate_during_gc(InCSetState dest, |
172 size_t word_size) { |
165 size_t word_size) { |