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

Unified Diff: src/heap/heap.h

Issue 1374203002: [heap] No leakage of incremental-marking.h outside of heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « src/api.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 1029250f6981fd3101e9a0a8fb3c99cccb5b2397..3d6fc21af495b8356e2425cdb31e3869970abcdb 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -14,8 +14,7 @@
#include "src/assert-scope.h"
#include "src/atomic-utils.h"
#include "src/globals.h"
-// TODO(mstarzinger): Three more includes to kill!
-#include "src/heap/incremental-marking.h"
+// TODO(mstarzinger): Two more includes to kill!
#include "src/heap/spaces.h"
#include "src/heap/store-buffer.h"
#include "src/list.h"
@@ -1215,6 +1214,10 @@ class Heap {
// Last hope GC, should try to squeeze as much as possible.
void CollectAllAvailableGarbage(const char* gc_reason = NULL);
+ // Reports and external memory pressure event, either performs a major GC or
+ // completes incremental marking in order to free external resources.
+ void ReportExternalMemoryPressure(const char* gc_reason = NULL);
+
// Invoked when GC was requested via the stack guard.
void HandleGCRequest();
@@ -1267,20 +1270,11 @@ class Heap {
GCCallbackFlags::kNoGCCallbackFlags,
const char* reason = nullptr);
- // Performs incremental marking steps of step_size_in_bytes as long as
- // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute
- // an estimate increment. Returns the remaining time that cannot be used
- // for incremental marking anymore because a single step would exceed the
- // deadline.
- double AdvanceIncrementalMarking(
- intptr_t step_size_in_bytes, double deadline_in_ms,
- IncrementalMarking::StepActions step_actions);
-
void FinalizeIncrementalMarkingIfComplete(const char* comment);
bool TryFinalizeIdleIncrementalMarking(double idle_time_in_ms);
- IncrementalMarking* incremental_marking() { return &incremental_marking_; }
+ IncrementalMarking* incremental_marking() { return incremental_marking_; }
// ===========================================================================
// External string table API. ================================================
@@ -2270,7 +2264,7 @@ class Heap {
StoreBuffer store_buffer_;
- IncrementalMarking incremental_marking_;
+ IncrementalMarking* incremental_marking_;
GCIdleTimeHandler* gc_idle_time_handler_;
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698