| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 464 |
| 465 HeapObject* ho = HeapObject::cast(obj); | 465 HeapObject* ho = HeapObject::cast(obj); |
| 466 | 466 |
| 467 CHECK(lo->Contains(HeapObject::cast(obj))); | 467 CHECK(lo->Contains(HeapObject::cast(obj))); |
| 468 | 468 |
| 469 CHECK(lo->FindObject(ho->address()) == obj); | 469 CHECK(lo->FindObject(ho->address()) == obj); |
| 470 | 470 |
| 471 CHECK(lo->Contains(ho)); | 471 CHECK(lo->Contains(ho)); |
| 472 | 472 |
| 473 while (true) { | 473 while (true) { |
| 474 intptr_t available = lo->Available(); | 474 size_t available = lo->Available(); |
| 475 { AllocationResult allocation = lo->AllocateRaw(lo_size, NOT_EXECUTABLE); | 475 { AllocationResult allocation = lo->AllocateRaw(lo_size, NOT_EXECUTABLE); |
| 476 if (allocation.IsRetry()) break; | 476 if (allocation.IsRetry()) break; |
| 477 } | 477 } |
| 478 // The available value is conservative such that it may report | 478 // The available value is conservative such that it may report |
| 479 // zero prior to heap exhaustion. | 479 // zero prior to heap exhaustion. |
| 480 CHECK(lo->Available() < available || available == 0); | 480 CHECK(lo->Available() < available || available == 0); |
| 481 } | 481 } |
| 482 | 482 |
| 483 CHECK(!lo->IsEmpty()); | 483 CHECK(!lo->IsEmpty()); |
| 484 | 484 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 HeapObject* filler = | 792 HeapObject* filler = |
| 793 HeapObject::FromAddress(array->address() + array->Size()); | 793 HeapObject::FromAddress(array->address() + array->Size()); |
| 794 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); | 794 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); |
| 795 | 795 |
| 796 const size_t shrinked = page->ShrinkToHighWaterMark(); | 796 const size_t shrinked = page->ShrinkToHighWaterMark(); |
| 797 CHECK_EQ(0u, shrinked); | 797 CHECK_EQ(0u, shrinked); |
| 798 } | 798 } |
| 799 | 799 |
| 800 } // namespace internal | 800 } // namespace internal |
| 801 } // namespace v8 | 801 } // namespace v8 |
| OLD | NEW |