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

Unified Diff: src/heap/mark-compact.h

Issue 2160613002: [heap] Remove black pages and use black areas instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: disable black allocation Created 4 years, 5 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
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 6a238839b18eb55d6139f1d83cc159a85343532c..8c93e4ba2ba29ebec14854e5321f41f045192340 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -218,7 +218,18 @@ class MarkBitCellIterator BASE_EMBEDDED {
inline void Advance() {
cell_index_++;
- cell_base_ += 32 * kPointerSize;
+ cell_base_ += Bitmap::kBitsPerCell * kPointerSize;
+ }
+
+ inline bool Advance(unsigned int new_cell_index) {
+ if (new_cell_index != cell_index_) {
+ DCHECK(new_cell_index > cell_index_);
ulan 2016/07/19 13:23:32 *DCHECK_GT DCHECK_LE(new_cell_index, last_cell_ind
Hannes Payer (out of office) 2016/07/19 14:42:53 Done.
+ unsigned int diff = new_cell_index - cell_index_;
+ cell_index_ = new_cell_index;
+ cell_base_ += diff * (Bitmap::kBitsPerCell * kPointerSize);
+ return true;
+ }
+ return false;
}
// Return the next mark bit cell. If there is no next it returns 0;
@@ -253,8 +264,6 @@ class LiveObjectIterator BASE_EMBEDDED {
it_(chunk_),
cell_base_(it_.CurrentCellBase()),
current_cell_(*it_.CurrentCell()) {
- // Black pages can not be iterated.
- DCHECK(!chunk->IsFlagSet(Page::BLACK_PAGE));
}
HeapObject* Next();

Powered by Google App Engine
This is Rietveld 408576698