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

Unified Diff: src/heap/heap.cc

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 | « src/heap/heap.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 26cffc8fb5524e51310776f74c2fbc3e0e7edf8b..16b5deccf6ebf97253d04db7e49c8a40f2285ac8 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -177,16 +177,23 @@ intptr_t Heap::Capacity() {
}
-intptr_t Heap::CommittedMemory() {
+intptr_t Heap::CommittedOldGenerationMemory() {
if (!HasBeenSetUp()) return 0;
- return new_space_.CommittedMemory() + old_pointer_space_->CommittedMemory() +
+ return old_pointer_space_->CommittedMemory() +
old_data_space_->CommittedMemory() + code_space_->CommittedMemory() +
map_space_->CommittedMemory() + cell_space_->CommittedMemory() +
property_cell_space_->CommittedMemory() + lo_space_->Size();
}
+intptr_t Heap::CommittedMemory() {
+ if (!HasBeenSetUp()) return 0;
+
+ return new_space_.CommittedMemory() + CommittedOldGenerationMemory();
+}
+
+
size_t Heap::CommittedPhysicalMemory() {
if (!HasBeenSetUp()) return 0;
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698