equal
deleted
inserted
replaced
225 // allocated memory, NULL if not successful. |
225 // allocated memory, NULL if not successful. |
226 HeapWord* plab_allocate(InCSetState dest, |
226 HeapWord* plab_allocate(InCSetState dest, |
227 size_t word_sz, |
227 size_t word_sz, |
228 AllocationContext_t context) { |
228 AllocationContext_t context) { |
229 G1PLAB* buffer = alloc_buffer(dest, context); |
229 G1PLAB* buffer = alloc_buffer(dest, context); |
230 if (_survivor_alignment_bytes == 0) { |
230 if (_survivor_alignment_bytes == 0 || !dest.is_young()) { |
231 return buffer->allocate(word_sz); |
231 return buffer->allocate(word_sz); |
232 } else { |
232 } else { |
233 return buffer->allocate_aligned(word_sz, _survivor_alignment_bytes); |
233 return buffer->allocate_aligned(word_sz, _survivor_alignment_bytes); |
234 } |
234 } |
235 } |
235 } |