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

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

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 | « no previous file | src/heap/spaces.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 perform_gc = !CanExpandOldGeneration(reservation->at(0).size); 1151 perform_gc = !CanExpandOldGeneration(reservation->at(0).size);
1152 } else { 1152 } else {
1153 for (auto& chunk : *reservation) { 1153 for (auto& chunk : *reservation) {
1154 AllocationResult allocation; 1154 AllocationResult allocation;
1155 int size = chunk.size; 1155 int size = chunk.size;
1156 DCHECK_LE(size, MemoryAllocator::PageAreaSize( 1156 DCHECK_LE(size, MemoryAllocator::PageAreaSize(
1157 static_cast<AllocationSpace>(space))); 1157 static_cast<AllocationSpace>(space)));
1158 if (space == NEW_SPACE) { 1158 if (space == NEW_SPACE) {
1159 allocation = new_space()->AllocateRawUnaligned(size); 1159 allocation = new_space()->AllocateRawUnaligned(size);
1160 } else { 1160 } else {
1161 allocation = paged_space(space)->AllocateRawUnaligned(size); 1161 // The deserializer will update the skip list.
1162 allocation = paged_space(space)->AllocateRawUnaligned(
1163 size, PagedSpace::IGNORE_SKIP_LIST);
1162 } 1164 }
1163 HeapObject* free_space = nullptr; 1165 HeapObject* free_space = nullptr;
1164 if (allocation.To(&free_space)) { 1166 if (allocation.To(&free_space)) {
1165 // Mark with a free list node, in case we have a GC before 1167 // Mark with a free list node, in case we have a GC before
1166 // deserializing. 1168 // deserializing.
1167 Address free_space_address = free_space->address(); 1169 Address free_space_address = free_space->address();
1168 CreateFillerObjectAt(free_space_address, size, 1170 CreateFillerObjectAt(free_space_address, size,
1169 ClearRecordedSlots::kNo); 1171 ClearRecordedSlots::kNo);
1170 DCHECK(space < SerializerDeserializer::kNumberOfPreallocatedSpaces); 1172 DCHECK(space < SerializerDeserializer::kNumberOfPreallocatedSpaces);
1171 chunk.start = free_space_address; 1173 chunk.start = free_space_address;
(...skipping 5234 matching lines...) Expand 10 before | Expand all | Expand 10 after
6406 } 6408 }
6407 6409
6408 6410
6409 // static 6411 // static
6410 int Heap::GetStaticVisitorIdForMap(Map* map) { 6412 int Heap::GetStaticVisitorIdForMap(Map* map) {
6411 return StaticVisitorBase::GetVisitorId(map); 6413 return StaticVisitorBase::GetVisitorId(map);
6412 } 6414 }
6413 6415
6414 } // namespace internal 6416 } // namespace internal
6415 } // namespace v8 6417 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698