Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index b7c2c54ec02378f5e2bf85d291d74e25164a7c21..1573491ff0a6c6e648b2302e097189825850d32c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -252,9 +252,8 @@ void i::FatalProcessOutOfMemory(const char* location) { |
i::V8::FatalProcessOutOfMemory(location, false); |
} |
- |
-// When V8 cannot allocated memory FatalProcessOutOfMemory is called. |
-// The default OOM error handler is called and execution is stopped. |
+// When V8 cannot allocate memory FatalProcessOutOfMemory is called. The default |
+// OOM error handler is called and execution is stopped. |
void i::V8::FatalProcessOutOfMemory(const char* location, bool is_heap_oom) { |
i::Isolate* isolate = i::Isolate::Current(); |
char last_few_messages[Heap::kTraceRingBufferSize + 1]; |
@@ -263,49 +262,53 @@ void i::V8::FatalProcessOutOfMemory(const char* location, bool is_heap_oom) { |
memset(js_stacktrace, 0, Heap::kStacktraceBufferSize + 1); |
i::HeapStats heap_stats; |
- int start_marker; |
+ intptr_t start_marker; |
heap_stats.start_marker = &start_marker; |
- int new_space_size; |
+ size_t new_space_size; |
heap_stats.new_space_size = &new_space_size; |
- int new_space_capacity; |
+ size_t new_space_capacity; |
heap_stats.new_space_capacity = &new_space_capacity; |
- intptr_t old_space_size; |
+ size_t old_space_size; |
heap_stats.old_space_size = &old_space_size; |
- intptr_t old_space_capacity; |
+ size_t old_space_capacity; |
heap_stats.old_space_capacity = &old_space_capacity; |
- intptr_t code_space_size; |
+ size_t code_space_size; |
heap_stats.code_space_size = &code_space_size; |
- intptr_t code_space_capacity; |
+ size_t code_space_capacity; |
heap_stats.code_space_capacity = &code_space_capacity; |
- intptr_t map_space_size; |
+ size_t map_space_size; |
heap_stats.map_space_size = &map_space_size; |
- intptr_t map_space_capacity; |
+ size_t map_space_capacity; |
heap_stats.map_space_capacity = &map_space_capacity; |
- intptr_t lo_space_size; |
+ size_t lo_space_size; |
heap_stats.lo_space_size = &lo_space_size; |
- int global_handle_count; |
+ size_t global_handle_count; |
heap_stats.global_handle_count = &global_handle_count; |
- int weak_global_handle_count; |
+ size_t weak_global_handle_count; |
heap_stats.weak_global_handle_count = &weak_global_handle_count; |
- int pending_global_handle_count; |
+ size_t pending_global_handle_count; |
heap_stats.pending_global_handle_count = &pending_global_handle_count; |
- int near_death_global_handle_count; |
+ size_t near_death_global_handle_count; |
heap_stats.near_death_global_handle_count = &near_death_global_handle_count; |
- int free_global_handle_count; |
+ size_t free_global_handle_count; |
heap_stats.free_global_handle_count = &free_global_handle_count; |
- intptr_t memory_allocator_size; |
+ size_t memory_allocator_size; |
heap_stats.memory_allocator_size = &memory_allocator_size; |
- intptr_t memory_allocator_capacity; |
+ size_t memory_allocator_capacity; |
heap_stats.memory_allocator_capacity = &memory_allocator_capacity; |
- int objects_per_type[LAST_TYPE + 1] = {0}; |
+ size_t malloced_memory; |
+ heap_stats.malloced_memory = &malloced_memory; |
+ size_t malloced_peak_memory; |
+ heap_stats.malloced_peak_memory = &malloced_peak_memory; |
+ size_t objects_per_type[LAST_TYPE + 1] = {0}; |
heap_stats.objects_per_type = objects_per_type; |
- int size_per_type[LAST_TYPE + 1] = {0}; |
+ size_t size_per_type[LAST_TYPE + 1] = {0}; |
heap_stats.size_per_type = size_per_type; |
int os_error; |
heap_stats.os_error = &os_error; |
heap_stats.last_few_messages = last_few_messages; |
heap_stats.js_stacktrace = js_stacktrace; |
- int end_marker; |
+ intptr_t end_marker; |
heap_stats.end_marker = &end_marker; |
if (isolate->heap()->HasBeenSetUp()) { |
// BUG(1718): Don't use the take_snapshot since we don't support |