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

Unified Diff: src/heap/heap.cc

Issue 1864433003: [heap] Old generation limit is based on capacity. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 761ad3c1fbb7d8e8332891e562c73f626833c1ed..066c0fd00bbbf5e50bc01b8dcfab345465c97eeb 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -192,8 +192,14 @@ Heap::Heap()
intptr_t Heap::Capacity() {
if (!HasBeenSetUp()) return 0;
- return new_space_.Capacity() + old_space_->Capacity() +
- code_space_->Capacity() + map_space_->Capacity();
+ return new_space_.Capacity() + OldGenerationCapacity();
+}
+
+intptr_t Heap::OldGenerationCapacity() {
+ if (!HasBeenSetUp()) return 0;
+
+ return old_space_->Capacity() + code_space_->Capacity() +
+ map_space_->Capacity() + lo_space_->SizeOfObjects();
}
« 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