OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. | 210 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. |
211 // The default fatal error handler is called and execution is stopped. | 211 // The default fatal error handler is called and execution is stopped. |
212 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { | 212 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { |
213 i::HeapStats heap_stats; | 213 i::HeapStats heap_stats; |
214 int start_marker; | 214 int start_marker; |
215 heap_stats.start_marker = &start_marker; | 215 heap_stats.start_marker = &start_marker; |
216 int new_space_size; | 216 int new_space_size; |
217 heap_stats.new_space_size = &new_space_size; | 217 heap_stats.new_space_size = &new_space_size; |
218 int new_space_capacity; | 218 int new_space_capacity; |
219 heap_stats.new_space_capacity = &new_space_capacity; | 219 heap_stats.new_space_capacity = &new_space_capacity; |
220 intptr_t old_pointer_space_size; | 220 intptr_t old_space_size; |
221 heap_stats.old_pointer_space_size = &old_pointer_space_size; | 221 heap_stats.old_space_size = &old_space_size; |
222 intptr_t old_pointer_space_capacity; | 222 intptr_t old_space_capacity; |
223 heap_stats.old_pointer_space_capacity = &old_pointer_space_capacity; | 223 heap_stats.old_space_capacity = &old_space_capacity; |
224 intptr_t old_data_space_size; | |
225 heap_stats.old_data_space_size = &old_data_space_size; | |
226 intptr_t old_data_space_capacity; | |
227 heap_stats.old_data_space_capacity = &old_data_space_capacity; | |
228 intptr_t code_space_size; | 224 intptr_t code_space_size; |
229 heap_stats.code_space_size = &code_space_size; | 225 heap_stats.code_space_size = &code_space_size; |
230 intptr_t code_space_capacity; | 226 intptr_t code_space_capacity; |
231 heap_stats.code_space_capacity = &code_space_capacity; | 227 heap_stats.code_space_capacity = &code_space_capacity; |
232 intptr_t map_space_size; | 228 intptr_t map_space_size; |
233 heap_stats.map_space_size = &map_space_size; | 229 heap_stats.map_space_size = &map_space_size; |
234 intptr_t map_space_capacity; | 230 intptr_t map_space_capacity; |
235 heap_stats.map_space_capacity = &map_space_capacity; | 231 heap_stats.map_space_capacity = &map_space_capacity; |
236 intptr_t cell_space_size; | 232 intptr_t cell_space_size; |
237 heap_stats.cell_space_size = &cell_space_size; | 233 heap_stats.cell_space_size = &cell_space_size; |
(...skipping 7849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8087 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8083 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8088 Address callback_address = | 8084 Address callback_address = |
8089 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8085 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8090 VMState<EXTERNAL> state(isolate); | 8086 VMState<EXTERNAL> state(isolate); |
8091 ExternalCallbackScope call_scope(isolate, callback_address); | 8087 ExternalCallbackScope call_scope(isolate, callback_address); |
8092 callback(info); | 8088 callback(info); |
8093 } | 8089 } |
8094 | 8090 |
8095 | 8091 |
8096 } } // namespace v8::internal | 8092 } } // namespace v8::internal |
OLD | NEW |