mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8031323: Optionally align objects copied to survivor spaces
Reviewed-by: brutisso, tschatzl
This commit is contained in:
parent
a959c0971e
commit
5f2c33e42b
16 changed files with 201 additions and 25 deletions
|
@ -288,7 +288,12 @@ void G1ParScanThreadState::undo_allocation(GCAllocPurpose purpose, HeapWord* obj
|
|||
}
|
||||
|
||||
HeapWord* G1ParScanThreadState::allocate(GCAllocPurpose purpose, size_t word_sz) {
|
||||
HeapWord* obj = alloc_buffer(purpose)->allocate(word_sz);
|
||||
HeapWord* obj = NULL;
|
||||
if (purpose == GCAllocForSurvived) {
|
||||
obj = alloc_buffer(GCAllocForSurvived)->allocate_aligned(word_sz, SurvivorAlignmentInBytes);
|
||||
} else {
|
||||
obj = alloc_buffer(GCAllocForTenured)->allocate(word_sz);
|
||||
}
|
||||
if (obj != NULL) {
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue