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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 | 2318 |
2319 DISALLOW_COPY_AND_ASSIGN(Heap); | 2319 DISALLOW_COPY_AND_ASSIGN(Heap); |
2320 }; | 2320 }; |
2321 | 2321 |
2322 | 2322 |
2323 class HeapStats { | 2323 class HeapStats { |
2324 public: | 2324 public: |
2325 static const int kStartMarker = 0xDECADE00; | 2325 static const int kStartMarker = 0xDECADE00; |
2326 static const int kEndMarker = 0xDECADE01; | 2326 static const int kEndMarker = 0xDECADE01; |
2327 | 2327 |
2328 int* start_marker; // 0 | 2328 intptr_t* start_marker; // 0 |
2329 int* new_space_size; // 1 | 2329 size_t* new_space_size; // 1 |
2330 int* new_space_capacity; // 2 | 2330 size_t* new_space_capacity; // 2 |
2331 intptr_t* old_space_size; // 3 | 2331 size_t* old_space_size; // 3 |
2332 intptr_t* old_space_capacity; // 4 | 2332 size_t* old_space_capacity; // 4 |
2333 intptr_t* code_space_size; // 5 | 2333 size_t* code_space_size; // 5 |
2334 intptr_t* code_space_capacity; // 6 | 2334 size_t* code_space_capacity; // 6 |
2335 intptr_t* map_space_size; // 7 | 2335 size_t* map_space_size; // 7 |
2336 intptr_t* map_space_capacity; // 8 | 2336 size_t* map_space_capacity; // 8 |
2337 intptr_t* lo_space_size; // 9 | 2337 size_t* lo_space_size; // 9 |
2338 int* global_handle_count; // 10 | 2338 size_t* global_handle_count; // 10 |
2339 int* weak_global_handle_count; // 11 | 2339 size_t* weak_global_handle_count; // 11 |
2340 int* pending_global_handle_count; // 12 | 2340 size_t* pending_global_handle_count; // 12 |
2341 int* near_death_global_handle_count; // 13 | 2341 size_t* near_death_global_handle_count; // 13 |
2342 int* free_global_handle_count; // 14 | 2342 size_t* free_global_handle_count; // 14 |
2343 intptr_t* memory_allocator_size; // 15 | 2343 size_t* memory_allocator_size; // 15 |
2344 intptr_t* memory_allocator_capacity; // 16 | 2344 size_t* memory_allocator_capacity; // 16 |
2345 int* objects_per_type; // 17 | 2345 size_t* malloced_memory; // 17 |
2346 int* size_per_type; // 18 | 2346 size_t* malloced_peak_memory; // 18 |
2347 int* os_error; // 19 | 2347 size_t* objects_per_type; // 19 |
2348 char* last_few_messages; // 20 | 2348 size_t* size_per_type; // 20 |
2349 char* js_stacktrace; // 21 | 2349 int* os_error; // 21 |
2350 int* end_marker; // 22 | 2350 char* last_few_messages; // 22 |
| 2351 char* js_stacktrace; // 23 |
| 2352 intptr_t* end_marker; // 24 |
2351 }; | 2353 }; |
2352 | 2354 |
2353 | 2355 |
2354 class AlwaysAllocateScope { | 2356 class AlwaysAllocateScope { |
2355 public: | 2357 public: |
2356 explicit inline AlwaysAllocateScope(Isolate* isolate); | 2358 explicit inline AlwaysAllocateScope(Isolate* isolate); |
2357 inline ~AlwaysAllocateScope(); | 2359 inline ~AlwaysAllocateScope(); |
2358 | 2360 |
2359 private: | 2361 private: |
2360 Heap* heap_; | 2362 Heap* heap_; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 friend class LargeObjectSpace; | 2711 friend class LargeObjectSpace; |
2710 friend class NewSpace; | 2712 friend class NewSpace; |
2711 friend class PagedSpace; | 2713 friend class PagedSpace; |
2712 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2714 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2713 }; | 2715 }; |
2714 | 2716 |
2715 } // namespace internal | 2717 } // namespace internal |
2716 } // namespace v8 | 2718 } // namespace v8 |
2717 | 2719 |
2718 #endif // V8_HEAP_HEAP_H_ | 2720 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |