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

Unified Diff: src/heap/mark-compact.h

Issue 1772733002: [heap] Move to two-level free-list (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase on disabled black allocation 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 2f580b6bbe366d3db92e8ee013662cccfa08e083..7bd02215b7082911e3d151e8620fe08cb8e97bd6 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -572,18 +572,19 @@ class MarkCompactCollector {
// address range.
void RemoveObjectSlots(Address start_slot, Address end_slot);
- //
- // Free lists filled by sweeper and consumed by corresponding spaces
- // (including compaction spaces).
- //
- base::SmartPointer<FreeList>& free_list_old_space() {
- return free_list_old_space_;
- }
- base::SmartPointer<FreeList>& free_list_code_space() {
- return free_list_code_space_;
- }
- base::SmartPointer<FreeList>& free_list_map_space() {
- return free_list_map_space_;
+ base::Mutex* swept_pages_mutex() { return &swept_pages_mutex_; }
+ List<Page*>* swept_pages(AllocationSpace id) {
+ switch (id) {
+ case OLD_SPACE:
+ return &swept_old_space_pages_;
+ case CODE_SPACE:
+ return &swept_code_space_pages_;
+ case MAP_SPACE:
+ return &swept_map_space_pages_;
+ default:
+ UNREACHABLE();
+ }
+ return nullptr;
}
private:
@@ -834,9 +835,10 @@ class MarkCompactCollector {
List<Page*> evacuation_candidates_;
List<NewSpacePage*> newspace_evacuation_candidates_;
- base::SmartPointer<FreeList> free_list_old_space_;
- base::SmartPointer<FreeList> free_list_code_space_;
- base::SmartPointer<FreeList> free_list_map_space_;
+ base::Mutex swept_pages_mutex_;
+ List<Page*> swept_old_space_pages_;
+ List<Page*> swept_code_space_pages_;
+ List<Page*> swept_map_space_pages_;
SweepingList sweeping_list_old_space_;
SweepingList sweeping_list_code_space_;
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698