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

Unified Diff: test/cctest/test-heap.cc

Issue 585523002: The --optimize-for-size flag should imply a small semi-space (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 8852b8820ffa19573fdcd26bb4a661bdab1acc42..31d817c924c2a5d5e004e5273cb850186f2987b8 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -4360,7 +4360,7 @@ TEST(PromotionQueue) {
// In this test we will try to overwrite the promotion queue which is at the
// end of to-space. To actually make that possible, we need at least two
- // semi-space pages and take advantage of fragementation.
+ // semi-space pages and take advantage of fragmentation.
// (1) Grow semi-space to two pages.
// (2) Create a few small long living objects and call the scavenger to
// move them to the other semi-space.
@@ -4380,6 +4380,12 @@ TEST(PromotionQueue) {
// Grow the semi-space to two pages to make semi-space copy overwrite the
// promotion queue, which will be at the end of the second page.
intptr_t old_capacity = new_space->Capacity();
+
+ // If we are in a low memory config, we can't grow to two pages and we can't
+ // run this test. This also means the issue we are testing cannot arise, as
+ // there is no fragmentation.
+ if (new_space->IsAtMaximumCapacity()) return;
+
new_space->Grow();
CHECK(new_space->IsAtMaximumCapacity());
CHECK(2 * old_capacity == new_space->Capacity());
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698