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

Unified Diff: src/heap/spaces.h

Issue 2504993002: [heap] Minor MC: Add evacuation phase (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 5103cbf11ef5c5d27836200c0feac34bc7ecbe48..badc048029330fa15c6e882bb8984b9325e6163b 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -282,6 +282,12 @@ class MemoryChunk {
// triggering on the same page.
COMPACTION_WAS_ABORTED_FOR_TESTING = 1u << 16,
+ // |CANNOT_BE_VERIFIED|: Used for moved pages to indicate that these pages
+ // cannot be verified due to stale pointers in the body. Note that the
+ // objects can still be iterated over, as the size can be correctly
+ // obtained.
+ CANNOT_BE_VERIFIED = 1u << 17,
+
// |ANCHOR|: Flag is set if page is an anchor.
ANCHOR = 1u << 17,
};
@@ -1892,6 +1898,9 @@ class PagedSpace : public Space {
public:
typedef PageIterator iterator;
+ // Reuse a page for allocation only if it has at least {kPageReuseThreshold}
+ // memory available in its freelist.
+ static const size_t kPageReuseThreshold = 4 * KB;
static const intptr_t kCompactionMemoryWanted = 500 * KB;
// Creates a space with an id.
@@ -2104,6 +2113,10 @@ class PagedSpace : public Space {
std::unique_ptr<ObjectIterator> GetObjectIterator() override;
+ // Removes a page from the space.
+ Page* RemovePageSafe();
+ void AddPage(Page* page);
+
protected:
// PagedSpaces that should be included in snapshots have different, i.e.,
// smaller, initial pages.
« src/heap/mark-compact.cc ('K') | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698