Index: test/cctest/test-alloc.cc |
diff --git a/test/cctest/test-alloc.cc b/test/cctest/test-alloc.cc |
index c654dfa8bbed8947b09f2673299f79c24a5ddcea..769fe7be297cc3872691e8957fe925dbe5f2da34 100644 |
--- a/test/cctest/test-alloc.cc |
+++ b/test/cctest/test-alloc.cc |
@@ -88,7 +88,7 @@ static MaybeObject* AllocateAfterFailures() { |
static const int kLargeObjectSpaceFillerLength = 300000; |
static const int kLargeObjectSpaceFillerSize = FixedArray::SizeFor( |
kLargeObjectSpaceFillerLength); |
- ASSERT(kLargeObjectSpaceFillerSize > heap->MaxObjectSizeInPagedSpace()); |
+ ASSERT(kLargeObjectSpaceFillerSize > heap->old_pointer_space()->AreaSize()); |
while (heap->OldGenerationSpaceAvailable() > kLargeObjectSpaceFillerSize) { |
CHECK(!heap->AllocateFixedArray(kLargeObjectSpaceFillerLength, TENURED)-> |
IsFailure()); |
@@ -214,11 +214,13 @@ TEST(CodeRange) { |
while (total_allocated < 5 * code_range_size) { |
if (current_allocated < code_range_size / 10) { |
// Allocate a block. |
- // Geometrically distributed sizes, greater than Page::kMaxHeapObjectSize. |
+ // Geometrically distributed sizes, greater than |
+ // Page::kMaxNonCodeHeapObjectSize (which is greater than code page area). |
// TODO(gc): instead of using 3 use some contant based on code_range_size |
// kMaxHeapObjectSize. |
- size_t requested = (Page::kMaxHeapObjectSize << (Pseudorandom() % 3)) + |
- Pseudorandom() % 5000 + 1; |
+ size_t requested = |
+ (Page::kMaxNonCodeHeapObjectSize << (Pseudorandom() % 3)) + |
+ Pseudorandom() % 5000 + 1; |
size_t allocated = 0; |
Address base = code_range->AllocateRawMemory(requested, &allocated); |
CHECK(base != NULL); |