| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 15 matching lines...) Expand all Loading... |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include <stdlib.h> | 28 #include <stdlib.h> |
| 29 | 29 |
| 30 #include "v8.h" | 30 #include "v8.h" |
| 31 #include "cctest.h" | 31 #include "cctest.h" |
| 32 | 32 |
| 33 using namespace v8::internal; | 33 using namespace v8::internal; |
| 34 | 34 |
| 35 static void VerifyRegionMarking(Address page_start) { | 35 static void VerifyRegionMarking(Address page_start) { |
| 36 if (FLAG_new_gc) return; |
| 37 |
| 36 Page* p = Page::FromAddress(page_start); | 38 Page* p = Page::FromAddress(page_start); |
| 37 | 39 |
| 38 p->SetRegionMarks(Page::kAllRegionsCleanMarks); | 40 p->SetRegionMarks(Page::kAllRegionsCleanMarks); |
| 39 | 41 |
| 40 for (Address addr = p->ObjectAreaStart(); | 42 for (Address addr = p->ObjectAreaStart(); |
| 41 addr < p->ObjectAreaEnd(); | 43 addr < p->ObjectAreaEnd(); |
| 42 addr += kPointerSize) { | 44 addr += kPointerSize) { |
| 43 CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr)); | 45 CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr)); |
| 44 } | 46 } |
| 45 | 47 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 230 |
| 229 CHECK(!lo->IsEmpty()); | 231 CHECK(!lo->IsEmpty()); |
| 230 | 232 |
| 231 CHECK(lo->AllocateRaw(lo_size)->IsFailure()); | 233 CHECK(lo->AllocateRaw(lo_size)->IsFailure()); |
| 232 | 234 |
| 233 lo->TearDown(); | 235 lo->TearDown(); |
| 234 delete lo; | 236 delete lo; |
| 235 | 237 |
| 236 MemoryAllocator::TearDown(); | 238 MemoryAllocator::TearDown(); |
| 237 } | 239 } |
| OLD | NEW |