[PA] Fix over-copying on realloc expansion
Currently, on realloc expansion, GetSize() bytes are copied. This is the maximum size that an allocation can be stretched to within a slot, not the actual size available to the application at the moment. These are equivalent for small buckets, but not for single-slot slot spans where extras can be glued immediately after the allocation. The added test would fail without this fix. Change-Id: Ic83e79c11e0a5b3b70f5c90a0bd1f157cbeae703 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636101Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Kentaro Hara <haraken@chromium.org> Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#845502}
Showing
Please register or sign in to comment