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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.h

Issue 1414253004: [Oilpan] Add HeapObjectHeader::gcGeneration() and related methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapPage.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.h b/third_party/WebKit/Source/platform/heap/HeapPage.h
index e1f17dea22cd8dd78930fcde1bad120963e296f5..647642b53cbe279f380982bdd02786e31cefc45f 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.h
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.h
@@ -172,6 +172,7 @@ public:
{
#if ENABLE(ASSERT)
m_magic = magic;
+ putGcGeneration();
#endif
// sizeof(HeapObjectHeader) must be equal to or smaller than
// allocationGranurarity, because HeapObjectHeader is used as a header
@@ -216,6 +217,10 @@ public:
// object allocated here, but it was freed because nobody marked it during
// GC.
void zapMagic();
+
+ void putGcGeneration();
sof 2015/11/10 16:09:24 What does this give you beyond what magic values a
peria 2015/11/10 16:45:01 They do same works to check an object is alive or
+ void clearGcGeneration();
+ uint16_t gcGeneration() const { return m_gcGeneration; }
#endif
void finalize(Address, size_t);
@@ -228,6 +233,7 @@ private:
uint32_t m_encoded;
#if ENABLE(ASSERT)
uint16_t m_magic;
+ uint16_t m_gcGeneration;
#endif
// In 64 bit architectures, we intentionally add 4 byte padding immediately
@@ -258,6 +264,7 @@ public:
#if ENABLE(ASSERT)
ASSERT(size >= sizeof(HeapObjectHeader));
zapMagic();
+ clearGcGeneration();
#endif
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698