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

Unified Diff: src/heap/heap.cc

Issue 2395563002: [heap] Use size_t throughout MemoryAllocator (Closed)
Patch Set: Fix compilation Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/spaces.h » ('j') | src/heap/spaces.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index d1f46a45ac6e7be05e9e92749105be5ff6767c33..4ceab15d0fcb251e6ec5d1fab9286caeb4b34f45 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -275,7 +275,8 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
// and does not count available bytes already in the old space or code
// space. Undercounting is safe---we may get an unrequested full GC when
// a scavenge would have succeeded.
- if (memory_allocator()->MaxAvailable() <= new_space_->Size()) {
+ if (static_cast<intptr_t>(memory_allocator()->MaxAvailable()) <=
+ new_space_->Size()) {
isolate_->counters()
->gc_compactor_caused_by_oldspace_exhaustion()
->Increment();
@@ -315,8 +316,9 @@ void Heap::ReportStatisticsBeforeGC() {
void Heap::PrintShortHeapStatistics() {
if (!FLAG_trace_gc_verbose) return;
- PrintIsolate(isolate_, "Memory allocator, used: %6" V8PRIdPTR
- " KB, available: %6" V8PRIdPTR " KB\n",
+ PrintIsolate(isolate_,
+ "Memory allocator, used: %6zu KB,"
+ " available: %6zu KB\n",
memory_allocator()->Size() / KB,
memory_allocator()->Available() / KB);
PrintIsolate(isolate_, "New space, used: %6" V8PRIdPTR
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/spaces.h » ('j') | src/heap/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698