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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // Executing the empty script gets by with the same number of pages, i.e., | 523 // Executing the empty script gets by with the same number of pages, i.e., |
524 // requires no extra space. | 524 // requires no extra space. |
525 CompileRun("/*empty*/"); | 525 CompileRun("/*empty*/"); |
526 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { | 526 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { |
527 // Debug code can be very large, so skip CODE_SPACE if we are generating it. | 527 // Debug code can be very large, so skip CODE_SPACE if we are generating it. |
528 if (i == CODE_SPACE && i::FLAG_debug_code) continue; | 528 if (i == CODE_SPACE && i::FLAG_debug_code) continue; |
529 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages()); | 529 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages()); |
530 } | 530 } |
531 | 531 |
532 // No large objects required to perform the above steps. | 532 // No large objects required to perform the above steps. |
533 CHECK_EQ(initial_lo_space, isolate->heap()->lo_space()->Size()); | 533 CHECK_EQ(initial_lo_space, |
| 534 static_cast<size_t>(isolate->heap()->lo_space()->Size())); |
534 } | 535 } |
535 | 536 |
536 static HeapObject* AllocateUnaligned(NewSpace* space, int size) { | 537 static HeapObject* AllocateUnaligned(NewSpace* space, int size) { |
537 AllocationResult allocation = space->AllocateRawUnaligned(size); | 538 AllocationResult allocation = space->AllocateRawUnaligned(size); |
538 CHECK(!allocation.IsRetry()); | 539 CHECK(!allocation.IsRetry()); |
539 HeapObject* filler = NULL; | 540 HeapObject* filler = NULL; |
540 CHECK(allocation.To(&filler)); | 541 CHECK(allocation.To(&filler)); |
541 space->heap()->CreateFillerObjectAt(filler->address(), size, | 542 space->heap()->CreateFillerObjectAt(filler->address(), size, |
542 ClearRecordedSlots::kNo); | 543 ClearRecordedSlots::kNo); |
543 return filler; | 544 return filler; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 HeapObject* filler = | 792 HeapObject* filler = |
792 HeapObject::FromAddress(array->address() + array->Size()); | 793 HeapObject::FromAddress(array->address() + array->Size()); |
793 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); | 794 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); |
794 | 795 |
795 const size_t shrinked = page->ShrinkToHighWaterMark(); | 796 const size_t shrinked = page->ShrinkToHighWaterMark(); |
796 CHECK_EQ(0, shrinked); | 797 CHECK_EQ(0, shrinked); |
797 } | 798 } |
798 | 799 |
799 } // namespace internal | 800 } // namespace internal |
800 } // namespace v8 | 801 } // namespace v8 |
OLD | NEW |