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 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3806 ResourceConstraints(); | 3806 ResourceConstraints(); |
| 3807 int max_young_space_size() const { return max_young_space_size_; } | 3807 int max_young_space_size() const { return max_young_space_size_; } |
| 3808 void set_max_young_space_size(int value) { max_young_space_size_ = value; } | 3808 void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
| 3809 int max_old_space_size() const { return max_old_space_size_; } | 3809 int max_old_space_size() const { return max_old_space_size_; } |
| 3810 void set_max_old_space_size(int value) { max_old_space_size_ = value; } | 3810 void set_max_old_space_size(int value) { max_old_space_size_ = value; } |
| 3811 int max_executable_size() { return max_executable_size_; } | 3811 int max_executable_size() { return max_executable_size_; } |
| 3812 void set_max_executable_size(int value) { max_executable_size_ = value; } | 3812 void set_max_executable_size(int value) { max_executable_size_ = value; } |
| 3813 uint32_t* stack_limit() const { return stack_limit_; } | 3813 uint32_t* stack_limit() const { return stack_limit_; } |
| 3814 // Sets an address beyond which the VM's stack may not grow. | 3814 // Sets an address beyond which the VM's stack may not grow. |
| 3815 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } | 3815 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
| 3816 Maybe<bool> is_memory_constrained() { return is_memory_constrained_; } | |
|
Sven Panne
2013/09/10 06:09:56
Missing const.
| |
| 3817 // If set to true, V8 will limit it's memory usage, at the potential cost of | |
| 3818 // lower performance. Note, this option is a tentative addition to the API | |
| 3819 // and may be removed or modified without warning. | |
| 3820 void set_memory_constrained(bool value) { | |
| 3821 is_memory_constrained_ = Maybe<bool>(value); | |
| 3822 } | |
| 3823 | |
| 3816 private: | 3824 private: |
| 3817 int max_young_space_size_; | 3825 int max_young_space_size_; |
| 3818 int max_old_space_size_; | 3826 int max_old_space_size_; |
| 3819 int max_executable_size_; | 3827 int max_executable_size_; |
| 3820 uint32_t* stack_limit_; | 3828 uint32_t* stack_limit_; |
| 3829 Maybe<bool> is_memory_constrained_; | |
| 3821 }; | 3830 }; |
| 3822 | 3831 |
| 3823 | 3832 |
| 3824 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); | 3833 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); |
| 3825 | 3834 |
| 3826 | 3835 |
| 3827 // --- Exceptions --- | 3836 // --- Exceptions --- |
| 3828 | 3837 |
| 3829 | 3838 |
| 3830 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 3839 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
| (...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6549 */ | 6558 */ |
| 6550 | 6559 |
| 6551 | 6560 |
| 6552 } // namespace v8 | 6561 } // namespace v8 |
| 6553 | 6562 |
| 6554 | 6563 |
| 6555 #undef TYPE_CHECK | 6564 #undef TYPE_CHECK |
| 6556 | 6565 |
| 6557 | 6566 |
| 6558 #endif // V8_H_ | 6567 #endif // V8_H_ |
| OLD | NEW |