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

Side by Side Diff: src/heap/spaces-inl.h

Issue 1159453004: Add SIMD 128 alignment support to Heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only mark aligned object memory as MSAN uninitialized. Created 5 years, 6 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.cc ('k') | test/cctest/test-heap.cc » ('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 #ifndef V8_HEAP_SPACES_INL_H_ 5 #ifndef V8_HEAP_SPACES_INL_H_
6 #define V8_HEAP_SPACES_INL_H_ 6 #define V8_HEAP_SPACES_INL_H_
7 7
8 #include "src/heap/spaces.h" 8 #include "src/heap/spaces.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // allocated, so assume the worst case. 304 // allocated, so assume the worst case.
305 int filler_size = Heap::GetMaximumFillToAlign(alignment); 305 int filler_size = Heap::GetMaximumFillToAlign(alignment);
306 allocation_size += filler_size; 306 allocation_size += filler_size;
307 object = free_list_.Allocate(allocation_size); 307 object = free_list_.Allocate(allocation_size);
308 if (object == NULL) { 308 if (object == NULL) {
309 object = SlowAllocateRaw(allocation_size); 309 object = SlowAllocateRaw(allocation_size);
310 } 310 }
311 if (object != NULL && filler_size != 0) { 311 if (object != NULL && filler_size != 0) {
312 object = heap()->AlignWithFiller(object, size_in_bytes, allocation_size, 312 object = heap()->AlignWithFiller(object, size_in_bytes, allocation_size,
313 alignment); 313 alignment);
314 // Filler objects are initialized, so mark only the aligned object memory
315 // as uninitialized.
316 allocation_size = size_in_bytes;
314 } 317 }
315 } 318 }
316 319
317 if (object != NULL) { 320 if (object != NULL) {
318 MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), allocation_size); 321 MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), allocation_size);
319 return object; 322 return object;
320 } 323 }
321 324
322 return AllocationResult::Retry(identity()); 325 return AllocationResult::Retry(identity());
323 } 326 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 404
402 405
403 intptr_t LargeObjectSpace::Available() { 406 intptr_t LargeObjectSpace::Available() {
404 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); 407 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
405 } 408 }
406 409
407 } 410 }
408 } // namespace v8::internal 411 } // namespace v8::internal
409 412
410 #endif // V8_HEAP_SPACES_INL_H_ 413 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698