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

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

Issue 2565713002: [heap] Initialize the owner on each page after lospace allocation (Closed)
Patch Set: Simplify msan marking Created 4 years 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/spaces.h ('k') | src/heap/spaces-inl.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 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2969 size_ += static_cast<int>(page->size()); 2969 size_ += static_cast<int>(page->size());
2970 AccountCommitted(page->size()); 2970 AccountCommitted(page->size());
2971 objects_size_ += object_size; 2971 objects_size_ += object_size;
2972 page_count_++; 2972 page_count_++;
2973 page->set_next_page(first_page_); 2973 page->set_next_page(first_page_);
2974 first_page_ = page; 2974 first_page_ = page;
2975 2975
2976 InsertChunkMapEntries(page); 2976 InsertChunkMapEntries(page);
2977 2977
2978 HeapObject* object = page->GetObject(); 2978 HeapObject* object = page->GetObject();
2979 MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), object_size);
2980 2979
2981 if (Heap::ShouldZapGarbage()) { 2980 if (Heap::ShouldZapGarbage()) {
2982 // Make the object consistent so the heap can be verified in OldSpaceStep. 2981 // Make the object consistent so the heap can be verified in OldSpaceStep.
2983 // We only need to do this in debug builds or if verify_heap is on. 2982 // We only need to do this in debug builds or if verify_heap is on.
2984 reinterpret_cast<Object**>(object->address())[0] = 2983 reinterpret_cast<Object**>(object->address())[0] =
2985 heap()->fixed_array_map(); 2984 heap()->fixed_array_map();
2986 reinterpret_cast<Object**>(object->address())[1] = Smi::kZero; 2985 reinterpret_cast<Object**>(object->address())[1] = Smi::kZero;
2987 } 2986 }
2988 2987
2989 heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags, 2988 heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3230 object->ShortPrint(); 3229 object->ShortPrint();
3231 PrintF("\n"); 3230 PrintF("\n");
3232 } 3231 }
3233 printf(" --------------------------------------\n"); 3232 printf(" --------------------------------------\n");
3234 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3233 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3235 } 3234 }
3236 3235
3237 #endif // DEBUG 3236 #endif // DEBUG
3238 } // namespace internal 3237 } // namespace internal
3239 } // namespace v8 3238 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698