On Wed, 14 Oct 2020 20:42:44 GMT, Calvin Cheung <[email protected]> wrote:
>> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes >> the unrelated changes brought in by the merge/rebase. The pull request >> contains four additional commits since the last >> revision: >> - Merge branch 'master' of https://github.com/openjdk/jdk into >> 8254125-cppvtables-assert-on-win32 >> - Fixed more cases with align_up(xxx, SharedSpaceObjectAlignment) >> - Merge branch 'master' into 8254125-cppvtables-assert-on-win32 >> - 8254125: Assertion in cppVtables.cpp during builds on 32bit Windows > > Marked as reviewed by ccheung (Reviewer). > In the function > `ArchiveBuilder::gather_klass_and_symbol(MetaspaceClosure::Ref* ref, bool > read_only)` > Instead of `BytesPerWord`, is `BytesPerInt` more appropriate since the > `ref->size()` returns an int? Hi Calvin, thanks for the review. For the line `int bytes = ref->size() * BytesPerWord;`, `ref->size()` has the same API as all the `size()` methods of the `MetaspaceObj` classes. I.e., "the number of words needed to hold this object". That's why we need to multiple by `BytesPerWord` to calculate the number of bytes needed. ------------- PR: https://git.openjdk.java.net/jdk/pull/591
