equal
deleted
inserted
replaced
120 HeapWord* obj = top(); |
120 HeapWord* obj = top(); |
121 HeapWord* new_top = obj + size; |
121 HeapWord* new_top = obj + size; |
122 // The 'new_top>obj' check is needed to detect overflow of obj+size. |
122 // The 'new_top>obj' check is needed to detect overflow of obj+size. |
123 if (new_top > obj && new_top <= end()) { |
123 if (new_top > obj && new_top <= end()) { |
124 set_top(new_top); |
124 set_top(new_top); |
125 assert(is_ptr_object_aligned(obj) && is_ptr_object_aligned(new_top), |
125 assert(is_object_aligned(obj) && is_object_aligned(new_top), |
126 "checking alignment"); |
126 "checking alignment"); |
127 _start_array->allocate_block(obj); |
127 _start_array->allocate_block(obj); |
128 return obj; |
128 return obj; |
129 } |
129 } |
130 |
130 |