Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 inline intptr_t OldGenerationCapacityAvailable() { | 1514 inline intptr_t OldGenerationCapacityAvailable() { |
| 1515 return max_old_generation_size_ - PromotedTotalSize(); | 1515 return max_old_generation_size_ - PromotedTotalSize(); |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 static const intptr_t kMinimumOldGenerationAllocationLimit = | 1518 static const intptr_t kMinimumOldGenerationAllocationLimit = |
| 1519 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); | 1519 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
| 1520 | 1520 |
| 1521 intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) { | 1521 intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) { |
| 1522 intptr_t limit = FLAG_stress_compaction ? | 1522 intptr_t limit = FLAG_stress_compaction |
| 1523 old_gen_size + old_gen_size / 10 : old_gen_size * 4; | 1523 ? old_gen_size + old_gen_size / 10 |
| 1524 : old_gen_size * old_generation_growing_factor_; | |
| 1524 limit = Max(limit, kMinimumOldGenerationAllocationLimit); | 1525 limit = Max(limit, kMinimumOldGenerationAllocationLimit); |
| 1525 limit += new_space_.Capacity(); | 1526 limit += new_space_.Capacity(); |
| 1526 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; | 1527 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; |
| 1527 return Min(limit, halfway_to_the_max); | 1528 return Min(limit, halfway_to_the_max); |
| 1528 } | 1529 } |
| 1529 | 1530 |
| 1530 // Indicates whether inline bump-pointer allocation has been disabled. | 1531 // Indicates whether inline bump-pointer allocation has been disabled. |
| 1531 bool inline_allocation_disabled() { return inline_allocation_disabled_; } | 1532 bool inline_allocation_disabled() { return inline_allocation_disabled_; } |
| 1532 | 1533 |
| 1533 // Switch whether inline bump-pointer allocation should be used. | 1534 // Switch whether inline bump-pointer allocation should be used. |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1879 Object* roots_[kRootListLength]; | 1880 Object* roots_[kRootListLength]; |
| 1880 | 1881 |
| 1881 intptr_t code_range_size_; | 1882 intptr_t code_range_size_; |
| 1882 int reserved_semispace_size_; | 1883 int reserved_semispace_size_; |
| 1883 int max_semispace_size_; | 1884 int max_semispace_size_; |
| 1884 int initial_semispace_size_; | 1885 int initial_semispace_size_; |
| 1885 intptr_t max_old_generation_size_; | 1886 intptr_t max_old_generation_size_; |
| 1886 intptr_t max_executable_size_; | 1887 intptr_t max_executable_size_; |
| 1887 intptr_t maximum_committed_; | 1888 intptr_t maximum_committed_; |
| 1888 | 1889 |
| 1890 int old_generation_growing_factor_; | |
|
Michael Starzinger
2014/04/15 12:11:50
nit: Can we haz short comment of the semantics?
| |
| 1891 | |
| 1889 // For keeping track of how much data has survived | 1892 // For keeping track of how much data has survived |
| 1890 // scavenge since last new space expansion. | 1893 // scavenge since last new space expansion. |
| 1891 int survived_since_last_expansion_; | 1894 int survived_since_last_expansion_; |
| 1892 | 1895 |
| 1893 // For keeping track on when to flush RegExp code. | 1896 // For keeping track on when to flush RegExp code. |
| 1894 int sweep_generation_; | 1897 int sweep_generation_; |
| 1895 | 1898 |
| 1896 int always_allocate_scope_depth_; | 1899 int always_allocate_scope_depth_; |
| 1897 int linear_allocation_scope_depth_; | 1900 int linear_allocation_scope_depth_; |
| 1898 | 1901 |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3058 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3061 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3059 | 3062 |
| 3060 private: | 3063 private: |
| 3061 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3064 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3062 }; | 3065 }; |
| 3063 #endif // DEBUG | 3066 #endif // DEBUG |
| 3064 | 3067 |
| 3065 } } // namespace v8::internal | 3068 } } // namespace v8::internal |
| 3066 | 3069 |
| 3067 #endif // V8_HEAP_H_ | 3070 #endif // V8_HEAP_H_ |
| OLD | NEW |