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

Unified Diff: src/heap/heap.h

Issue 979783002: Respect accumulative old generation memory limit in all spaces. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 0b353b70f1d269a79b747f65cedc23fc0d487958..919b606d10e18bf427a0b3905229c663bc5d7328 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -607,6 +607,9 @@ class Heap {
// Returns the amount of memory currently committed for the heap.
intptr_t CommittedMemory();
+ // Returns the amount of memory currently committed for the old space.
+ intptr_t CommittedOldGenerationMemory();
+
// Returns the amount of executable memory currently committed for the heap.
intptr_t CommittedMemoryExecutable();
@@ -690,6 +693,12 @@ class Heap {
return old_data_space_->allocation_limit_address();
}
+ // TODO(hpayer): There is still a missmatch between capacity and actual
+ // committed memory size.
+ bool CanExpandOldGeneration(int size) {
+ return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize();
+ }
+
// Returns a deep copy of the JavaScript object.
// Properties and elements are copied too.
// Optionally takes an AllocationSite to be appended in an AllocationMemento.
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698