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_H_ | 5 #ifndef V8_HEAP_H_ |
6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 }; | 543 }; |
544 | 544 |
545 | 545 |
546 class Heap { | 546 class Heap { |
547 public: | 547 public: |
548 // Configure heap size in MB before setup. Return false if the heap has been | 548 // Configure heap size in MB before setup. Return false if the heap has been |
549 // set up already. | 549 // set up already. |
550 bool ConfigureHeap(int max_semi_space_size, | 550 bool ConfigureHeap(int max_semi_space_size, |
551 int max_old_space_size, | 551 int max_old_space_size, |
552 int max_executable_size, | 552 int max_executable_size, |
553 int code_range_size); | 553 size_t code_range_size); |
554 bool ConfigureHeapDefault(); | 554 bool ConfigureHeapDefault(); |
555 | 555 |
556 // Prepares the heap, setting up memory areas that are needed in the isolate | 556 // Prepares the heap, setting up memory areas that are needed in the isolate |
557 // without actually creating any objects. | 557 // without actually creating any objects. |
558 bool SetUp(); | 558 bool SetUp(); |
559 | 559 |
560 // Bootstraps the object heap with the core set of objects required to run. | 560 // Bootstraps the object heap with the core set of objects required to run. |
561 // Returns whether it succeeded. | 561 // Returns whether it succeeded. |
562 bool CreateHeapObjects(); | 562 bool CreateHeapObjects(); |
563 | 563 |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 | 1497 |
1498 // Caches the amount of external memory registered at the last global gc. | 1498 // Caches the amount of external memory registered at the last global gc. |
1499 int64_t amount_of_external_allocated_memory_at_last_global_gc_; | 1499 int64_t amount_of_external_allocated_memory_at_last_global_gc_; |
1500 | 1500 |
1501 // This can be calculated directly from a pointer to the heap; however, it is | 1501 // This can be calculated directly from a pointer to the heap; however, it is |
1502 // more expedient to get at the isolate directly from within Heap methods. | 1502 // more expedient to get at the isolate directly from within Heap methods. |
1503 Isolate* isolate_; | 1503 Isolate* isolate_; |
1504 | 1504 |
1505 Object* roots_[kRootListLength]; | 1505 Object* roots_[kRootListLength]; |
1506 | 1506 |
1507 intptr_t code_range_size_; | 1507 size_t code_range_size_; |
1508 int reserved_semispace_size_; | 1508 int reserved_semispace_size_; |
1509 int max_semi_space_size_; | 1509 int max_semi_space_size_; |
1510 int initial_semispace_size_; | 1510 int initial_semispace_size_; |
1511 intptr_t max_old_generation_size_; | 1511 intptr_t max_old_generation_size_; |
1512 intptr_t max_executable_size_; | 1512 intptr_t max_executable_size_; |
1513 intptr_t maximum_committed_; | 1513 intptr_t maximum_committed_; |
1514 | 1514 |
1515 // The old space growing factor is used in the old space heap growing | 1515 // The old space growing factor is used in the old space heap growing |
1516 // strategy. The new old space size is the current old space size times | 1516 // strategy. The new old space size is the current old space size times |
1517 // old_space_growing_factor_. | 1517 // old_space_growing_factor_. |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2783 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2784 | 2784 |
2785 private: | 2785 private: |
2786 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2786 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2787 }; | 2787 }; |
2788 #endif // DEBUG | 2788 #endif // DEBUG |
2789 | 2789 |
2790 } } // namespace v8::internal | 2790 } } // namespace v8::internal |
2791 | 2791 |
2792 #endif // V8_HEAP_H_ | 2792 #endif // V8_HEAP_H_ |
OLD | NEW |