8184753: Asserts against MinObjectAlignment should avoid integer division

Delegate to is_object_aligned that does the right thing

Reviewed-by: mgerdin, tschatzl
This commit is contained in:
Aleksey Shipilev 2017-07-18 10:20:52 +02:00
parent e8485a5e09
commit 03a7858eb4
3 changed files with 4 additions and 4 deletions

View file

@ -268,8 +268,8 @@ int oopDesc::size_given_klass(Klass* klass) {
}
}
assert(s % MinObjAlignment == 0, "Oop size is not properly aligned: %d", s);
assert(s > 0, "Oop size must be greater than zero, not %d", s);
assert(is_object_aligned(s), "Oop size is not properly aligned: %d", s);
return s;
}