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

Unified Diff: src/heap/heap.cc

Issue 2381493004: [heap] Set progress bar flag for FixedArray upon allocation (Closed)
Patch Set: Addressed comment Created 4 years, 3 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 | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index ab82d2b74098fcabcb660a6cfa0c51f2185b837d..ce2940ac9261bb75307f431c226c57ffb45ea500 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3937,7 +3937,14 @@ AllocationResult Heap::AllocateRawFixedArray(int length,
int size = FixedArray::SizeFor(length);
AllocationSpace space = SelectSpace(pretenure);
- return AllocateRaw(size, space);
+ AllocationResult result = AllocateRaw(size, space);
+ if (!result.IsRetry() && size > kMaxRegularHeapObjectSize &&
+ FLAG_use_marking_progress_bar) {
+ MemoryChunk* chunk =
+ MemoryChunk::FromAddress(result.ToObjectChecked()->address());
+ chunk->SetFlag(MemoryChunk::HAS_PROGRESS_BAR);
+ }
+ return result;
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698