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

Unified Diff: src/heap/spaces.h

Issue 1511933002: [cctest] Add tests for aborting compaction of pages (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More tests Created 5 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
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | src/heap/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 94ab4dc513e1bb296ccd7d5bb05daa8b661345b7..dba29a29bdf0bdebb9adc1ee078d12d8bd3e4d60 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -2130,6 +2130,10 @@ class PagedSpace : public Space {
// Slow path of AllocateRaw. This function is space-dependent.
MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes);
+ virtual bool ShouldForceOOM() { return force_oom_; }
+
+ void SetForcedOOM(bool value) { force_oom_ = value; }
+
int area_size_;
// Accounting information for this space.
@@ -2152,6 +2156,9 @@ class PagedSpace : public Space {
// Mutex guarding any concurrent access to the space.
base::Mutex space_mutex_;
+ bool force_oom_;
+
+ friend class CompactionSpace;
friend class MarkCompactCollector;
friend class PageIterator;
@@ -2922,6 +2929,8 @@ class CompactionSpace : public PagedSpace {
MUST_USE_RESULT HeapObject* SweepAndRetryAllocation(
int size_in_bytes) override;
+
+ bool ShouldForceOOM() override;
};
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | src/heap/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698