| Index: src/heap.h
|
| ===================================================================
|
| --- src/heap.h (revision 12520)
|
| +++ src/heap.h (working copy)
|
| @@ -1315,6 +1315,9 @@
|
| return disallow_allocation_failure_;
|
| }
|
|
|
| + bool flush_eagerly() { return flush_eagerly_; }
|
| + void set_flush_eagerly(bool to) { flush_eagerly_ = to; }
|
| +
|
| void TracePathToObjectFrom(Object* target, Object* root);
|
| void TracePathToObject(Object* target);
|
| void TracePathToGlobal();
|
| @@ -1772,6 +1775,9 @@
|
| // rates caused by the mutator allocating a lot of long-lived objects.
|
| bool new_space_high_promotion_mode_active_;
|
|
|
| + // For emergency memory-freeing GCs.
|
| + bool flush_eagerly_;
|
| +
|
| // Limit that triggers a global GC on the next (normally caused) GC. This
|
| // is checked when we have already decided to do a GC to help determine
|
| // which collector to invoke.
|
| @@ -2196,6 +2202,16 @@
|
| };
|
|
|
|
|
| +class FlushEagerly {
|
| + public:
|
| + inline FlushEagerly();
|
| + inline ~FlushEagerly();
|
| +
|
| + private:
|
| + bool old_state_;
|
| +};
|
| +
|
| +
|
| class AlwaysAllocateScope {
|
| public:
|
| inline AlwaysAllocateScope();
|
|
|