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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: add pointer alignment handling to SparseHeapBitmap Created 4 years 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: third_party/WebKit/Source/platform/heap/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index bc83a90b9886d3b9b3a41c77f2e50dee28f1a5de..7fb5bf00f03c601abbd3702d62474937d8efa0a6 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -35,6 +35,7 @@
#include "platform/ScriptForbiddenScope.h"
#include "platform/heap/BlinkGCMemoryDumpProvider.h"
#include "platform/heap/CallbackStack.h"
+#include "platform/heap/HeapCompact.h"
#include "platform/heap/MarkingVisitor.h"
#include "platform/heap/PageMemory.h"
#include "platform/heap/PagePool.h"
@@ -412,6 +413,24 @@ void ThreadHeap::commitCallbackStacks() {
m_ephemeronStack->commit();
}
+HeapCompact* ThreadHeap::compaction() {
+ if (!m_compaction)
+ m_compaction = HeapCompact::create();
+ return m_compaction.get();
+}
+
+void ThreadHeap::registerMovingObjectReference(MovableReference* slot) {
+ DCHECK(slot && *slot);
haraken 2016/12/09 07:25:54 DCHECK(slot); DCHECK(*slot); It would help to ide
sof 2016/12/09 21:44:03 Done.
+ compaction()->registerMovingObjectReference(slot);
+}
+
+void ThreadHeap::registerMovingObjectCallback(MovableReference reference,
+ MovingObjectCallback callback,
+ void* callbackData) {
+ DCHECK(reference);
+ compaction()->registerMovingObjectCallback(reference, callback, callbackData);
+}
+
void ThreadHeap::decommitCallbackStacks() {
m_markingStack->decommit();
m_postMarkingCallbackStack->decommit();

Powered by Google App Engine
This is Rietveld 408576698