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

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

Issue 1816463002: [heap] Fix skip list for deserialized code objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: added comment Created 4 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 unified diff | Download patch
« no previous file with comments | « src/heap/spaces.h ('k') | src/snapshot/deserializer.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/incremental-marking.h" 8 #include "src/heap/incremental-marking.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 *size_in_bytes += filler_size; 491 *size_in_bytes += filler_size;
492 return heap()->PrecedeWithFiller(HeapObject::FromAddress(current_top), 492 return heap()->PrecedeWithFiller(HeapObject::FromAddress(current_top),
493 filler_size); 493 filler_size);
494 } 494 }
495 495
496 return HeapObject::FromAddress(current_top); 496 return HeapObject::FromAddress(current_top);
497 } 497 }
498 498
499 499
500 // Raw allocation. 500 // Raw allocation.
501 AllocationResult PagedSpace::AllocateRawUnaligned(int size_in_bytes) { 501 AllocationResult PagedSpace::AllocateRawUnaligned(
502 int size_in_bytes, UpdateSkipList update_skip_list) {
502 HeapObject* object = AllocateLinearly(size_in_bytes); 503 HeapObject* object = AllocateLinearly(size_in_bytes);
503 504
504 if (object == NULL) { 505 if (object == NULL) {
505 object = free_list_.Allocate(size_in_bytes); 506 object = free_list_.Allocate(size_in_bytes);
506 if (object == NULL) { 507 if (object == NULL) {
507 object = SlowAllocateRaw(size_in_bytes); 508 object = SlowAllocateRaw(size_in_bytes);
508 } 509 }
509 } 510 }
510 511
511 if (object != NULL) { 512 if (object != NULL) {
512 if (identity() == CODE_SPACE) { 513 if (update_skip_list == UPDATE_SKIP_LIST && identity() == CODE_SPACE) {
513 SkipList::Update(object->address(), size_in_bytes); 514 SkipList::Update(object->address(), size_in_bytes);
514 } 515 }
515 MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), size_in_bytes); 516 MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), size_in_bytes);
516 return object; 517 return object;
517 } 518 }
518 519
519 return AllocationResult::Retry(identity()); 520 return AllocationResult::Retry(identity());
520 } 521 }
521 522
522 523
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 other->allocation_info_.Reset(nullptr, nullptr); 690 other->allocation_info_.Reset(nullptr, nullptr);
690 return true; 691 return true;
691 } 692 }
692 return false; 693 return false;
693 } 694 }
694 695
695 } // namespace internal 696 } // namespace internal
696 } // namespace v8 697 } // namespace v8
697 698
698 #endif // V8_HEAP_SPACES_INL_H_ 699 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/snapshot/deserializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698