Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: test/cctest/heap/test-spaces.cc

Issue 2490523003: [heap] Use size_t for heap and space counters. (Closed)
Patch Set: more fixes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698