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

Unified Diff: src/heap/spaces-inl.h

Issue 1420423009: [heap] Black allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« src/heap/heap.cc ('K') | « src/heap/spaces.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index d578055229cf4638bba94097bd4e89ad7492234a..28f7737cb1df581488b33d4ce819a13925fc8123 100644
--- a/src/heap/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -25,6 +25,11 @@ void Bitmap::Clear(MemoryChunk* chunk) {
chunk->ResetLiveBytes();
}
+void Bitmap::SetAllBits(MemoryChunk* chunk) {
+ Bitmap* bitmap = chunk->markbits();
+ for (int i = 0; i < bitmap->CellsCount(); i++)
+ bitmap->cells()[i] = 0xffffffff;
+}
// -----------------------------------------------------------------------------
// PageIterator
@@ -264,6 +269,7 @@ void MemoryChunk::ResetLiveBytes() {
}
void MemoryChunk::IncrementLiveBytes(int by) {
+ if (IsFlagSet(BLACK_PAGE)) return;
if (FLAG_trace_live_bytes) {
PrintIsolate(heap()->isolate(),
"live-bytes: update page=%p delta=%d %d->%d\n", this, by,
« src/heap/heap.cc ('K') | « src/heap/spaces.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698