Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp @ 20317:ee019285a52c
8031323: Optionally align objects copied to survivor spaces
Reviewed-by: brutisso, tschatzl
author | jmasa |
---|---|
date | Mon, 04 Aug 2014 10:48:10 -0700 |
parents | 983092f35ff7 |
children | c2844108a708 |
comparison
equal
deleted
inserted
replaced
20316:3c048df3ef8b | 20317:ee019285a52c |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP | 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP |
26 #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP | 26 #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP |
27 | 27 #include "gc_interface/collectedHeap.hpp" |
28 #include "memory/allocation.hpp" | 28 #include "memory/allocation.hpp" |
29 #include "memory/blockOffsetTable.hpp" | 29 #include "memory/blockOffsetTable.hpp" |
30 #include "memory/threadLocalAllocBuffer.hpp" | 30 #include "memory/threadLocalAllocBuffer.hpp" |
31 #include "utilities/globalDefinitions.hpp" | 31 #include "utilities/globalDefinitions.hpp" |
32 | 32 |
82 } else { | 82 } else { |
83 return NULL; | 83 return NULL; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 // Allocate the object aligned to "alignment_in_bytes". | |
88 HeapWord* allocate_aligned(size_t word_sz, unsigned short alignment_in_bytes); | |
89 | |
87 // Undo the last allocation in the buffer, which is required to be of the | 90 // Undo the last allocation in the buffer, which is required to be of the |
88 // "obj" of the given "word_sz". | 91 // "obj" of the given "word_sz". |
89 void undo_allocation(HeapWord* obj, size_t word_sz) { | 92 void undo_allocation(HeapWord* obj, size_t word_sz) { |
90 assert(pointer_delta(_top, _bottom) >= word_sz, "Bad undo"); | 93 assert(pointer_delta(_top, _bottom) >= word_sz, "Bad undo"); |
91 assert(pointer_delta(_top, obj) == word_sz, "Bad undo"); | 94 assert(pointer_delta(_top, obj) == word_sz, "Bad undo"); |