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->CollectGarbage(OLD_POINTER_SPACE); | 95 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
| 96 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
96 | 97 |
97 // Array now sits in the old space | 98 // Array now sits in the old space |
98 CHECK(heap->InSpace(*array, OLD_POINTER_SPACE)); | 99 CHECK(heap->InSpace(*array, OLD_POINTER_SPACE)); |
99 } | 100 } |
100 | 101 |
101 | 102 |
102 TEST(NoPromotion) { | 103 TEST(NoPromotion) { |
103 CcTest::InitializeVM(); | 104 CcTest::InitializeVM(); |
104 TestHeap* heap = CcTest::test_heap(); | 105 TestHeap* heap = CcTest::test_heap(); |
105 heap->ConfigureHeap(1, 1, 1, 0); | 106 heap->ConfigureHeap(1, 1, 1, 0); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 492 |
492 | 493 |
493 TEST(RegressJoinThreadsOnIsolateDeinit) { | 494 TEST(RegressJoinThreadsOnIsolateDeinit) { |
494 intptr_t size_limit = ShortLivingIsolate() * 2; | 495 intptr_t size_limit = ShortLivingIsolate() * 2; |
495 for (int i = 0; i < 10; i++) { | 496 for (int i = 0; i < 10; i++) { |
496 CHECK_GT(size_limit, ShortLivingIsolate()); | 497 CHECK_GT(size_limit, ShortLivingIsolate()); |
497 } | 498 } |
498 } | 499 } |
499 | 500 |
500 #endif // __linux__ and !USE_SIMULATOR | 501 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |