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 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3810 * | 3810 * |
3811 * \param physical_memory The total amount of physical memory on the current | 3811 * \param physical_memory The total amount of physical memory on the current |
3812 * device, in bytes. | 3812 * device, in bytes. |
3813 */ | 3813 */ |
3814 void ConfigureDefaults(uint64_t physical_memory); | 3814 void ConfigureDefaults(uint64_t physical_memory); |
3815 | 3815 |
3816 int max_young_space_size() const { return max_young_space_size_; } | 3816 int max_young_space_size() const { return max_young_space_size_; } |
3817 void set_max_young_space_size(int value) { max_young_space_size_ = value; } | 3817 void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
3818 int max_old_space_size() const { return max_old_space_size_; } | 3818 int max_old_space_size() const { return max_old_space_size_; } |
3819 void set_max_old_space_size(int value) { max_old_space_size_ = value; } | 3819 void set_max_old_space_size(int value) { max_old_space_size_ = value; } |
3820 int max_executable_size() { return max_executable_size_; } | 3820 int max_executable_size() const { return max_executable_size_; } |
3821 void set_max_executable_size(int value) { max_executable_size_ = value; } | 3821 void set_max_executable_size(int value) { max_executable_size_ = value; } |
3822 uint32_t* stack_limit() const { return stack_limit_; } | 3822 uint32_t* stack_limit() const { return stack_limit_; } |
3823 // Sets an address beyond which the VM's stack may not grow. | 3823 // Sets an address beyond which the VM's stack may not grow. |
3824 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } | 3824 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
| 3825 int max_available_threads() const { return max_available_threads_; } |
| 3826 // Set the number of threads available to V8, assuming at least 1. |
| 3827 void set_max_available_threads(int value) { |
| 3828 max_available_threads_ = value; |
| 3829 } |
3825 | 3830 |
3826 private: | 3831 private: |
3827 int max_young_space_size_; | 3832 int max_young_space_size_; |
3828 int max_old_space_size_; | 3833 int max_old_space_size_; |
3829 int max_executable_size_; | 3834 int max_executable_size_; |
3830 uint32_t* stack_limit_; | 3835 uint32_t* stack_limit_; |
| 3836 int max_available_threads_; |
3831 }; | 3837 }; |
3832 | 3838 |
3833 | 3839 |
3834 V8_DEPRECATED( | 3840 V8_DEPRECATED( |
3835 "Use SetResourceConstraints(isolate, constraints) instead", | 3841 "Use SetResourceConstraints(isolate, constraints) instead", |
3836 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints)); | 3842 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints)); |
3837 | 3843 |
3838 | 3844 |
3839 /** | 3845 /** |
3840 * Sets the given ResourceConstraints on the given Isolate. | 3846 * Sets the given ResourceConstraints on the given Isolate. |
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6539 */ | 6545 */ |
6540 | 6546 |
6541 | 6547 |
6542 } // namespace v8 | 6548 } // namespace v8 |
6543 | 6549 |
6544 | 6550 |
6545 #undef TYPE_CHECK | 6551 #undef TYPE_CHECK |
6546 | 6552 |
6547 | 6553 |
6548 #endif // V8_H_ | 6554 #endif // V8_H_ |
OLD | NEW |