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

Unified Diff: Source/platform/heap/Visitor.h

Issue 808803007: Allocate GCInfo descriptor table during Oilpan initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: delete[] mismatch Created 5 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 | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index d0ec95fb9a7ff8086dd7f1820ceef173c7bf1b6e..e0511aef6949441b6ed38e714feb8a0885cd4f4d 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -842,12 +842,10 @@ struct TypenameStringTrait {
};
#endif
-// s_gcInfoMap is a map used to encode a GCInfo* into a 15 bit integer.
-// FIXME: Currently we only allow 2^12 types of GCInfos because
-// s_gcInfoMap[2^15] increases the bss size unacceptably.
-const size_t gcInfoIndexMax = 1 << 12;
+// s_gcInfoTable is a map used to encode a GCInfo* into a 15 bit integer.
+const size_t gcInfoIndexMax = 1 << 15;
extern PLATFORM_EXPORT int s_gcInfoIndex;
-extern PLATFORM_EXPORT const GCInfo* s_gcInfoMap[gcInfoIndexMax];
+extern PLATFORM_EXPORT GCInfo const** s_gcInfoTable;
// This macro should be used when returning a unique 15 bit integer
// for a given gcInfo.
@@ -855,7 +853,8 @@ extern PLATFORM_EXPORT const GCInfo* s_gcInfoMap[gcInfoIndexMax];
static const size_t gcInfoIndex = atomicIncrement(&s_gcInfoIndex); \
ASSERT(gcInfoIndex >= 1); \
ASSERT(gcInfoIndex < gcInfoIndexMax); \
- s_gcInfoMap[gcInfoIndex] = &gcInfo; \
+ ASSERT(s_gcInfoTable); \
+ s_gcInfoTable[gcInfoIndex] = &gcInfo; \
return gcInfoIndex;
template<typename T>
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698