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

Side by Side Diff: src/heap/spaces.cc

Issue 1108013003: Introduce --zap-cpp-pointers (off by default) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 if (Heap::ShouldZapGarbage()) { 3127 if (Heap::ShouldZapGarbage()) {
3128 // Make the object consistent so the heap can be verified in OldSpaceStep. 3128 // Make the object consistent so the heap can be verified in OldSpaceStep.
3129 // We only need to do this in debug builds or if verify_heap is on. 3129 // We only need to do this in debug builds or if verify_heap is on.
3130 reinterpret_cast<Object**>(object->address())[0] = 3130 reinterpret_cast<Object**>(object->address())[0] =
3131 heap()->fixed_array_map(); 3131 heap()->fixed_array_map();
3132 reinterpret_cast<Object**>(object->address())[1] = Smi::kZero; 3132 reinterpret_cast<Object**>(object->address())[1] = Smi::kZero;
3133 } 3133 }
3134 3134
3135 heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags, 3135 heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags,
3136 kNoGCCallbackFlags); 3136 kNoGCCallbackFlags);
3137
3137 AllocationStep(object->address(), object_size); 3138 AllocationStep(object->address(), object_size);
3138 3139
3139 heap()->CreateFillerObjectAt(object->address(), object_size, 3140 heap()->CreateFillerObjectAt(object->address(), object_size,
3140 ClearRecordedSlots::kNo); 3141 ClearRecordedSlots::kNo);
3141 3142
3142 if (heap()->incremental_marking()->black_allocation()) { 3143 if (heap()->incremental_marking()->black_allocation()) {
3143 ObjectMarking::WhiteToBlack(object, MarkingState::Internal(object)); 3144 ObjectMarking::WhiteToBlack(object, MarkingState::Internal(object));
3144 } 3145 }
3145 return object; 3146 return object;
3146 } 3147 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
3383 PrintF("\n"); 3384 PrintF("\n");
3384 } 3385 }
3385 printf(" --------------------------------------\n"); 3386 printf(" --------------------------------------\n");
3386 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, 3387 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size,
3387 MarkingState::Internal(this).live_bytes()); 3388 MarkingState::Internal(this).live_bytes());
3388 } 3389 }
3389 3390
3390 #endif // DEBUG 3391 #endif // DEBUG
3391 } // namespace internal 3392 } // namespace internal
3392 } // namespace v8 3393 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698