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

Unified Diff: Source/platform/heap/Heap.cpp

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.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index f884380da0f12dc1140b5d4df392d7550c287e8d..6981d3002891a5db64b204bb2704c8b9a09bf3b2 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -1982,6 +1982,10 @@ void Heap::init()
s_allocatedObjectSize = 0;
s_allocatedSpace = 0;
s_markedObjectSize = 0;
+
+ const size_t tableSize = gcInfoIndexMax * sizeof(GCInfo);
+ s_gcInfoTable = reinterpret_cast<GCInfo const**>(new uint8_t[tableSize]);
+ memset(s_gcInfoTable, 0, tableSize);
}
void Heap::shutdown()
@@ -2015,6 +2019,8 @@ void Heap::doShutdown()
s_ephemeronStack = nullptr;
delete s_regionTree;
s_regionTree = nullptr;
+ delete[] s_gcInfoTable;
+ s_gcInfoTable = nullptr;
ThreadState::shutdown();
ASSERT(Heap::allocatedSpace() == 0);
}
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698