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

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

Issue 1596343004: [heap] Sort sweep pages list by free memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adressed final comment Created 4 years, 11 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 | « src/heap/mark-compact.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index a59d36bfa1c463a4ecdd23caa683c98ec14dd7d9..d04c33548a73f7b880dcdac66b618dd9876f3cb7 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -12,6 +12,17 @@
namespace v8 {
namespace internal {
+inline std::vector<Page*>& MarkCompactCollector::sweeping_list(Space* space) {
+ if (space == heap()->old_space()) {
+ return sweeping_list_old_space_;
+ } else if (space == heap()->code_space()) {
+ return sweeping_list_code_space_;
+ }
+ DCHECK_EQ(space, heap()->map_space());
+ return sweeping_list_map_space_;
+}
+
+
void MarkCompactCollector::PushBlack(HeapObject* obj) {
DCHECK(Marking::IsBlack(Marking::MarkBitFrom(obj)));
if (marking_deque_.Push(obj)) {
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698