equal
deleted
inserted
replaced
247 assert(is_ptr_aligned(addr, HeapWordSize), |
247 assert(is_ptr_aligned(addr, HeapWordSize), |
248 "Address " PTR_FORMAT " is not properly aligned.", p2i(addr)); |
248 "Address " PTR_FORMAT " is not properly aligned.", p2i(addr)); |
249 assert(is_size_aligned(alignment_in_bytes, HeapWordSize), |
249 assert(is_size_aligned(alignment_in_bytes, HeapWordSize), |
250 "Alignment size %u is incorrect.", alignment_in_bytes); |
250 "Alignment size %u is incorrect.", alignment_in_bytes); |
251 |
251 |
252 HeapWord* new_addr = (HeapWord*) align_pointer_up(addr, alignment_in_bytes); |
252 HeapWord* new_addr = (HeapWord*) align_ptr_up(addr, alignment_in_bytes); |
253 size_t padding = pointer_delta(new_addr, addr); |
253 size_t padding = pointer_delta(new_addr, addr); |
254 |
254 |
255 if (padding == 0) { |
255 if (padding == 0) { |
256 return addr; |
256 return addr; |
257 } |
257 } |