| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 HEAP_TEST(MarkCompactCollector) { | 129 HEAP_TEST(MarkCompactCollector) { |
| 130 FLAG_incremental_marking = false; | 130 FLAG_incremental_marking = false; |
| 131 FLAG_retain_maps_for_n_gc = 0; | 131 FLAG_retain_maps_for_n_gc = 0; |
| 132 CcTest::InitializeVM(); | 132 CcTest::InitializeVM(); |
| 133 Isolate* isolate = CcTest::i_isolate(); | 133 Isolate* isolate = CcTest::i_isolate(); |
| 134 Heap* heap = CcTest::heap(); | 134 Heap* heap = CcTest::heap(); |
| 135 Factory* factory = isolate->factory(); | 135 Factory* factory = isolate->factory(); |
| 136 | 136 |
| 137 v8::HandleScope sc(CcTest::isolate()); | 137 v8::HandleScope sc(CcTest::isolate()); |
| 138 Handle<GlobalObject> global(isolate->context()->global_object()); | 138 Handle<JSGlobalObject> global(isolate->context()->global_object()); |
| 139 | 139 |
| 140 // call mark-compact when heap is empty | 140 // call mark-compact when heap is empty |
| 141 heap->CollectGarbage(OLD_SPACE, "trigger 1"); | 141 heap->CollectGarbage(OLD_SPACE, "trigger 1"); |
| 142 | 142 |
| 143 // keep allocating garbage in new space until it fails | 143 // keep allocating garbage in new space until it fails |
| 144 const int arraysize = 100; | 144 const int arraysize = 100; |
| 145 AllocationResult allocation; | 145 AllocationResult allocation; |
| 146 do { | 146 do { |
| 147 allocation = heap->AllocateFixedArray(arraysize); | 147 allocation = heap->AllocateFixedArray(arraysize); |
| 148 } while (!allocation.IsRetry()); | 148 } while (!allocation.IsRetry()); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 | 487 |
| 488 TEST(RegressJoinThreadsOnIsolateDeinit) { | 488 TEST(RegressJoinThreadsOnIsolateDeinit) { |
| 489 intptr_t size_limit = ShortLivingIsolate() * 2; | 489 intptr_t size_limit = ShortLivingIsolate() * 2; |
| 490 for (int i = 0; i < 10; i++) { | 490 for (int i = 0; i < 10; i++) { |
| 491 CHECK_GT(size_limit, ShortLivingIsolate()); | 491 CHECK_GT(size_limit, ShortLivingIsolate()); |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 | 494 |
| 495 #endif // __linux__ and !USE_SIMULATOR | 495 #endif // __linux__ and !USE_SIMULATOR |
| OLD | NEW |