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

Unified Diff: src/spaces.h

Issue 431563002: Use emergency memory in the case of out of memory during evacuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index 3fe71b2c574bb617d0155f3459f32b5999226d94..b8fa8c7eb9beb68e014b3a4d81765e2ceb69a6cf 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -1980,6 +1980,12 @@ class PagedSpace : public Space {
return area_size_;
}
+ void CreateEmergencyMemory();
+ void FreeEmergencyMemory();
+ void UseEmergencyMemory();
+
+ bool HasEmergencyMemory() { return emergency_memory_ != NULL; }
+
protected:
FreeList* free_list() { return &free_list_; }
@@ -2015,6 +2021,12 @@ class PagedSpace : public Space {
// end_of_unswept_pages_ page.
Page* end_of_unswept_pages_;
+ // Emergency memory is the memory of a full page for a given space, allocated
+ // conservatively before evacuating a page. If compaction fails due to out
+ // of memory error the emergency memory can be used to complete compaction.
+ // If not used, the emergency memory is released after compaction.
+ MemoryChunk* emergency_memory_;
+
// Expands the space by allocating a fixed number of pages. Returns false if
// it cannot allocate requested number of pages from OS, or if the hard heap
// size limit has been hit.
« no previous file with comments | « src/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698