Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index e7d7eedc2f49abf6eaff07a14c9180e5a602bb93..9d6204df2a53974b81b37bb965a1ae2f288aa7ea 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -5055,7 +5055,7 @@ void Heap::RecordStats(HeapStats* stats, bool take_snapshot) { |
*stats->start_marker = HeapStats::kStartMarker; |
*stats->end_marker = HeapStats::kEndMarker; |
*stats->new_space_size = new_space_.SizeAsInt(); |
- *stats->new_space_capacity = static_cast<int>(new_space_.Capacity()); |
+ *stats->new_space_capacity = new_space_.Capacity(); |
*stats->old_space_size = old_space_->SizeOfObjects(); |
*stats->old_space_capacity = old_space_->Capacity(); |
*stats->code_space_size = code_space_->SizeOfObjects(); |
@@ -5068,7 +5068,8 @@ void Heap::RecordStats(HeapStats* stats, bool take_snapshot) { |
*stats->memory_allocator_capacity = |
memory_allocator()->Size() + memory_allocator()->Available(); |
*stats->os_error = base::OS::GetLastError(); |
- memory_allocator()->Available(); |
+ *stats->malloced_memory = isolate_->allocator()->GetCurrentMemoryUsage(); |
+ *stats->malloced_peak_memory = isolate_->allocator()->GetMaxMemoryUsage(); |
if (take_snapshot) { |
HeapIterator iterator(this); |
for (HeapObject* obj = iterator.next(); obj != NULL; |