File tree 3 files changed +3
-9
lines changed
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,8 @@ const char* CodeBlob::compiler_name() const {
55
55
56
56
unsigned int CodeBlob::align_code_offset (int offset) {
57
57
// align the size to CodeEntryAlignment
58
- return
59
- ((offset + (int )CodeHeap::header_size () + (CodeEntryAlignment-1 )) & ~(CodeEntryAlignment-1 ))
60
- - (int )CodeHeap::header_size ();
58
+ int header_size = (int )CodeHeap::header_size ();
59
+ return align_up (offset + header_size, CodeEntryAlignment) - header_size;
61
60
}
62
61
63
62
Original file line number Diff line number Diff line change 30
30
#include " utilities/align.hpp"
31
31
#include " utilities/powerOfTwo.hpp"
32
32
33
- size_t CodeHeap::header_size () {
34
- return sizeof (HeapBlock);
35
- }
36
-
37
-
38
33
// Implementation of Heap
39
34
40
35
CodeHeap::CodeHeap (const char * name, const int code_blob_type)
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ class CodeHeap : public CHeapObj<mtCode> {
187
187
virtual CodeBlob* find_blob_unsafe (void * start) const ;
188
188
size_t alignment_unit () const ; // alignment of any block
189
189
size_t alignment_offset () const ; // offset of first byte of any block, within the enclosing alignment unit
190
- static size_t header_size (); // returns the header size for each heap block
190
+ static size_t header_size () { return sizeof (HeapBlock); } // returns the header size for each heap block
191
191
192
192
size_t segment_size () const { return _segment_size; } // for CodeHeapState
193
193
HeapBlock* first_block () const ; // for CodeHeapState
You can’t perform that action at this time.
0 commit comments