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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Call mark compact GC, and it should pass. | 122 // Call mark compact GC, and it should pass. |
123 heap->CollectGarbage(OLD_POINTER_SPACE); | 123 heap->CollectGarbage(OLD_POINTER_SPACE); |
124 } | 124 } |
125 | 125 |
126 | 126 |
127 TEST(MarkCompactCollector) { | 127 TEST(MarkCompactCollector) { |
128 FLAG_incremental_marking = false; | 128 FLAG_incremental_marking = false; |
129 CcTest::InitializeVM(); | 129 CcTest::InitializeVM(); |
130 Isolate* isolate = CcTest::i_isolate(); | 130 Isolate* isolate = CcTest::i_isolate(); |
131 Heap* heap = isolate->heap(); | 131 TestHeap* heap = CcTest::test_heap(); |
132 Factory* factory = isolate->factory(); | 132 Factory* factory = isolate->factory(); |
133 | 133 |
134 v8::HandleScope sc(CcTest::isolate()); | 134 v8::HandleScope sc(CcTest::isolate()); |
135 Handle<GlobalObject> global(isolate->context()->global_object()); | 135 Handle<GlobalObject> global(isolate->context()->global_object()); |
136 | 136 |
137 // call mark-compact when heap is empty | 137 // call mark-compact when heap is empty |
138 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 1"); | 138 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 1"); |
139 | 139 |
140 // keep allocating garbage in new space until it fails | 140 // keep allocating garbage in new space until it fails |
141 const int ARRAY_SIZE = 100; | 141 const int ARRAY_SIZE = 100; |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 | 523 |
524 TEST(RegressJoinThreadsOnIsolateDeinit) { | 524 TEST(RegressJoinThreadsOnIsolateDeinit) { |
525 intptr_t size_limit = ShortLivingIsolate() * 2; | 525 intptr_t size_limit = ShortLivingIsolate() * 2; |
526 for (int i = 0; i < 10; i++) { | 526 for (int i = 0; i < 10; i++) { |
527 CHECK_GT(size_limit, ShortLivingIsolate()); | 527 CHECK_GT(size_limit, ShortLivingIsolate()); |
528 } | 528 } |
529 } | 529 } |
530 | 530 |
531 #endif // __linux__ and !USE_SIMULATOR | 531 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |