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

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

Issue 2397373002: [heap] Use the thread-safe free modes also for RemoveRange in SlotSet. (Closed)
Patch Set: Created 4 years, 2 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
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 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 } 2905 }
2906 size_t used_size = RoundUp((object->address() - address()) + object->Size(), 2906 size_t used_size = RoundUp((object->address() - address()) + object->Size(),
2907 base::OS::CommitPageSize()); 2907 base::OS::CommitPageSize());
2908 if (used_size < CommittedPhysicalMemory()) { 2908 if (used_size < CommittedPhysicalMemory()) {
2909 return address() + used_size; 2909 return address() + used_size;
2910 } 2910 }
2911 return 0; 2911 return 0;
2912 } 2912 }
2913 2913
2914 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) { 2914 void LargePage::ClearOutOfLiveRangeSlots(Address free_start) {
2915 RememberedSet<OLD_TO_NEW>::RemoveRange(this, free_start, area_end()); 2915 RememberedSet<OLD_TO_NEW>::RemoveRange(this, free_start, area_end(),
2916 RememberedSet<OLD_TO_OLD>::RemoveRange(this, free_start, area_end()); 2916 SlotSet::FREE_EMPTY_BUCKETS);
2917 RememberedSet<OLD_TO_OLD>::RemoveRange(this, free_start, area_end(),
2918 SlotSet::FREE_EMPTY_BUCKETS);
2917 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(this, free_start, area_end()); 2919 RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(this, free_start, area_end());
2918 RememberedSet<OLD_TO_OLD>::RemoveRangeTyped(this, free_start, area_end()); 2920 RememberedSet<OLD_TO_OLD>::RemoveRangeTyped(this, free_start, area_end());
2919 } 2921 }
2920 2922
2921 // ----------------------------------------------------------------------------- 2923 // -----------------------------------------------------------------------------
2922 // LargeObjectIterator 2924 // LargeObjectIterator
2923 2925
2924 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) { 2926 LargeObjectIterator::LargeObjectIterator(LargeObjectSpace* space) {
2925 current_ = space->first_page_; 2927 current_ = space->first_page_;
2926 } 2928 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 object->ShortPrint(); 3242 object->ShortPrint();
3241 PrintF("\n"); 3243 PrintF("\n");
3242 } 3244 }
3243 printf(" --------------------------------------\n"); 3245 printf(" --------------------------------------\n");
3244 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3246 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3245 } 3247 }
3246 3248
3247 #endif // DEBUG 3249 #endif // DEBUG
3248 } // namespace internal 3250 } // namespace internal
3249 } // namespace v8 3251 } // namespace v8
OLDNEW
« src/heap/heap.cc ('K') | « 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