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 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4637 | 4637 |
4638 // Allocate a large object. | 4638 // Allocate a large object. |
4639 int size = Max(1000000, Page::kMaxRegularHeapObjectSize + KB); | 4639 int size = Max(1000000, Page::kMaxRegularHeapObjectSize + KB); |
4640 CHECK(size > Page::kMaxRegularHeapObjectSize); | 4640 CHECK(size > Page::kMaxRegularHeapObjectSize); |
4641 Handle<FixedArray> lo = isolate->factory()->NewFixedArray(size, TENURED); | 4641 Handle<FixedArray> lo = isolate->factory()->NewFixedArray(size, TENURED); |
4642 CHECK(heap->lo_space()->Contains(*lo)); | 4642 CHECK(heap->lo_space()->Contains(*lo)); |
4643 | 4643 |
4644 // Start incremental marking to active write barrier. | 4644 // Start incremental marking to active write barrier. |
4645 SimulateIncrementalMarking(heap, false); | 4645 SimulateIncrementalMarking(heap, false); |
4646 heap->incremental_marking()->AdvanceIncrementalMarking( | 4646 heap->incremental_marking()->AdvanceIncrementalMarking( |
4647 10000000, 10000000, IncrementalMarking::IdleStepActions()); | 4647 10000000, IncrementalMarking::IdleStepActions()); |
4648 | 4648 |
4649 // Create references from the large object to the object on the evacuation | 4649 // Create references from the large object to the object on the evacuation |
4650 // candidate. | 4650 // candidate. |
4651 const int kStep = size / 10; | 4651 const int kStep = size / 10; |
4652 for (int i = 0; i < size; i += kStep) { | 4652 for (int i = 0; i < size; i += kStep) { |
4653 lo->set(i, *lit); | 4653 lo->set(i, *lit); |
4654 CHECK(lo->get(i) == old_location); | 4654 CHECK(lo->get(i) == old_location); |
4655 } | 4655 } |
4656 | 4656 |
4657 // Move the evaucation candidate object. | 4657 // Move the evaucation candidate object. |
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6607 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); | 6607 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); |
6608 } | 6608 } |
6609 } | 6609 } |
6610 // Force allocation from the free list. | 6610 // Force allocation from the free list. |
6611 heap->set_force_oom(true); | 6611 heap->set_force_oom(true); |
6612 heap->CollectGarbage(OLD_SPACE); | 6612 heap->CollectGarbage(OLD_SPACE); |
6613 } | 6613 } |
6614 | 6614 |
6615 } // namespace internal | 6615 } // namespace internal |
6616 } // namespace v8 | 6616 } // namespace v8 |
OLD | NEW |