totalPhysicalSize calculation when splitting a range must account for double rounding...
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2018 20:41:26 +0000 (20:41 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2018 20:41:26 +0000 (20:41 +0000)
commitc08692c1a3f2548de11056a928df47e4e6f4600e
treec82e2604505288d350f28ada3c3bca66751cd1b1
parent44c61a6d6ef3343dbf8bb4b58c4fb109f0d3f307
totalPhysicalSize calculation when splitting a range must account for double rounding effects
https://bugs.webkit.org/show_bug.cgi?id=184275

Reviewed by Mark Lam.

The rounding error could happen when we split a range where the
range's total physical size equals the range's total size. The
rounding may cause the left size to lose a byte, and the right
size to gain a byte. This caused the right side to be a byte
large than its size.

* bmalloc/LargeRange.h:
(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::split const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/LargeRange.h