[heap] Update limits in MemoryAllocator::TakeOverLargePage

When taking over large pages from another heap, allocated limits in
MemoryAllocator need to updated as well.

Bug: v8:13267, chromium:1401077
Change-Id: I2ef349578de34ff697a5fa76da17870fa171df95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4108649
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84859}
This commit is contained in:
Dominik Inführ 2022-12-15 09:34:23 +01:00 committed by V8 LUCI CQ
parent 70c7eefed0
commit 1d8d361976

View File

@ -485,6 +485,10 @@ void MemoryAllocator::TakeOverLargePage(LargePage* page,
size_ += page->size();
RecordLargePageCreated(*page);
const size_t area_end_page_aligned =
::RoundUp(page->area_end(), GetCommitPageSize());
UpdateAllocatedSpaceLimits(page->address(), area_end_page_aligned);
}
void MemoryAllocator::FreeReadOnlyPage(ReadOnlyPage* chunk) {