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

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

Issue 2110213003: Fix clearing of slots on large page uncommit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: x Created 4 years, 5 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/slot-set.h ('k') | test/cctest/heap/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 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/base/platform/semaphore.h" 9 #include "src/base/platform/semaphore.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2944 } 2944 }
2945 size_t used_size = RoundUp((object->address() - address()) + object->Size(), 2945 size_t used_size = RoundUp((object->address() - address()) + object->Size(),
2946 base::OS::CommitPageSize()); 2946 base::OS::CommitPageSize());
2947 if (used_size < CommittedPhysicalMemory()) { 2947 if (used_size < CommittedPhysicalMemory()) {
2948 return address() + used_size; 2948 return address() + used_size;
2949 } 2949 }
2950 return 0; 2950 return 0;
2951 } 2951 }
2952 2952
2953 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) { 2953 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) {
2954 if (old_to_new_slots() != nullptr) { 2954 RememberedSet<OLD_TO_NEW>::RemoveRange(this, free_start, area_end());
2955 old_to_new_slots()->RemoveRange( 2955 RememberedSet<OLD_TO_OLD>::RemoveRange(this, free_start, area_end());
2956 static_cast<int>(free_start - address()), 2956 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(this, free_start, area_end());
2957 static_cast<int>(free_start + size() - address())); 2957 RememberedSet<OLD_TO_OLD>::RemoveRangeTyped(this, free_start, area_end());
2958 }
2959 if (old_to_old_slots() != nullptr) {
2960 old_to_old_slots()->RemoveRange(
2961 static_cast<int>(free_start - address()),
2962 static_cast<int>(free_start + size() - address()));
2963 }
2964 } 2958 }
2965 2959
2966 // ----------------------------------------------------------------------------- 2960 // -----------------------------------------------------------------------------
2967 // LargeObjectIterator 2961 // LargeObjectIterator
2968 2962
2969 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { 2963 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) {
2970 current_ = space->first_page_; 2964 current_ = space->first_page_;
2971 } 2965 }
2972 2966
2973 2967
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 object->ShortPrint(); 3285 object->ShortPrint();
3292 PrintF("\n"); 3286 PrintF("\n");
3293 } 3287 }
3294 printf(" --------------------------------------\n"); 3288 printf(" --------------------------------------\n");
3295 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3289 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3296 } 3290 }
3297 3291
3298 #endif // DEBUG 3292 #endif // DEBUG
3299 } // namespace internal 3293 } // namespace internal
3300 } // namespace v8 3294 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/slot-set.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698