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

Unified Diff: src/heap.cc

Issue 207613004: Do not left-trim arrays when concurrent sweeping is active. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index e2b83f507a999a4103c23b9f26ddb7c615383a0c..9d11a44083bdb847b0ccd241d21d375b93212376 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3968,6 +3968,21 @@ void Heap::CreateFillerObjectAt(Address addr, int size) {
}
+bool Heap::CanMoveObjectStart(HeapObject* object) {
+ Address address = object->address();
+ bool is_in_old_pointer_space = InOldPointerSpace(address);
+ bool is_in_old_data_space = InOldDataSpace(address);
+
+ if (lo_space()->Contains(object)) return false;
+
+ // We cannot move the object start if the given old space page is
+ // concurrently swept.
+ return (!is_in_old_pointer_space && !is_in_old_data_space) ||
+ Page::FromAddress(address)->parallel_sweeping() <=
+ MemoryChunk::PARALLEL_SWEEPING_FINALIZE;
+}
+
+
void Heap::AdjustLiveBytes(Address address, int by, InvocationMode mode) {
if (incremental_marking()->IsMarking() &&
Marking::IsBlack(Marking::MarkBitFrom(address))) {
« no previous file with comments | « src/heap.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698