OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 int array_length = | 85 int array_length = |
86 (Page::kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) / | 86 (Page::kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) / |
87 (4 * kPointerSize); | 87 (4 * kPointerSize); |
88 Object* obj = heap->AllocateFixedArray(array_length).ToObjectChecked(); | 88 Object* obj = heap->AllocateFixedArray(array_length).ToObjectChecked(); |
89 Handle<FixedArray> array(FixedArray::cast(obj)); | 89 Handle<FixedArray> array(FixedArray::cast(obj)); |
90 | 90 |
91 // Array should be in the new space. | 91 // Array should be in the new space. |
92 CHECK(heap->InSpace(*array, NEW_SPACE)); | 92 CHECK(heap->InSpace(*array, NEW_SPACE)); |
93 | 93 |
94 // Call mark compact GC, so array becomes an old object. | 94 // Call mark compact GC, so array becomes an old object. |
95 heap->CollectAllGarbage(); | 95 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
96 heap->CollectAllGarbage(); | 96 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
97 | 97 |
98 // Array now sits in the old space | 98 // Array now sits in the old space |
99 CHECK(heap->InSpace(*array, OLD_SPACE)); | 99 CHECK(heap->InSpace(*array, OLD_SPACE)); |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 TEST(NoPromotion) { | 103 TEST(NoPromotion) { |
104 CcTest::InitializeVM(); | 104 CcTest::InitializeVM(); |
105 TestHeap* heap = CcTest::test_heap(); | 105 TestHeap* heap = CcTest::test_heap(); |
106 heap->ConfigureHeap(1, 1, 1, 0); | 106 heap->ConfigureHeap(1, 1, 1, 0); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 483 |
484 | 484 |
485 TEST(RegressJoinThreadsOnIsolateDeinit) { | 485 TEST(RegressJoinThreadsOnIsolateDeinit) { |
486 intptr_t size_limit = ShortLivingIsolate() * 2; | 486 intptr_t size_limit = ShortLivingIsolate() * 2; |
487 for (int i = 0; i < 10; i++) { | 487 for (int i = 0; i < 10; i++) { |
488 CHECK_GT(size_limit, ShortLivingIsolate()); | 488 CHECK_GT(size_limit, ShortLivingIsolate()); |
489 } | 489 } |
490 } | 490 } |
491 | 491 |
492 #endif // __linux__ and !USE_SIMULATOR | 492 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |