Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: src/heap/spaces.cc

Issue 2247303005: [heap] Use Page::FromAllocationAreaAddress when dealing with allocation info. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 1b7a189539caea07b66e15e7d11b9e7908fbfbfd..abf344e79f5316332540c8773b78b3979ffe94db 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -1258,7 +1258,7 @@ void PagedSpace::SetAllocationInfo(Address top, Address limit) {
SetTopAndLimit(top, limit);
if (top != nullptr && top != limit &&
heap()->incremental_marking()->black_allocation()) {
- Page* page = Page::FromAddress(top);
+ Page* page = Page::FromAllocationAreaAddress(top);
page->markbits()->SetRange(page->AddressToMarkbitIndex(top),
page->AddressToMarkbitIndex(limit));
page->IncrementLiveBytes(static_cast<int>(limit - top));
@@ -1270,7 +1270,7 @@ void PagedSpace::MarkAllocationInfoBlack() {
Address current_top = top();
Address current_limit = limit();
if (current_top != nullptr && current_top != current_limit) {
- Page* page = Page::FromAddress(current_top);
+ Page* page = Page::FromAllocationAreaAddress(current_top);
page->markbits()->SetRange(page->AddressToMarkbitIndex(current_top),
page->AddressToMarkbitIndex(current_limit));
page->IncrementLiveBytes(static_cast<int>(current_limit - current_top));
@@ -1289,7 +1289,7 @@ void PagedSpace::EmptyAllocationInfo() {
}
if (heap()->incremental_marking()->black_allocation()) {
- Page* page = Page::FromAddress(current_top);
+ Page* page = Page::FromAllocationAreaAddress(current_top);
// We have to remember the end of the current black allocation area if
// something was allocated in the current bump pointer range.
if (allocation_info_.original_top() != current_top) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698