Fix a DCHECK failure due to unmatching numbers of cards scanned.
- See the bug for details of the failure.
- After a discussion, we decided to get rid of the DCHECK as a simple
solution would not detect corner failure cases and a full solution
would add undesired complexity, and left a comment that explains
what situation had caused a DCHECK failure.
- Fix a potential error of failing to scan the last card that the end
of the image space falls on as a result of the image end being not
necessarily aligned by the card size.
- Remove dead/unused MarkSweep::ScanRoot().
- Add AlignUp and AlignDown for aligning pointers.
Bug: 11465268
Change-Id: Iee3018a42c48a159feb0e9cf77b1a6b303f5d245
3 files changed