| 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 3745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3756 ResourceConstraints(); | 3756 ResourceConstraints(); |
| 3757 int max_young_space_size() const { return max_young_space_size_; } | 3757 int max_young_space_size() const { return max_young_space_size_; } |
| 3758 void set_max_young_space_size(int value) { max_young_space_size_ = value; } | 3758 void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
| 3759 int max_old_space_size() const { return max_old_space_size_; } | 3759 int max_old_space_size() const { return max_old_space_size_; } |
| 3760 void set_max_old_space_size(int value) { max_old_space_size_ = value; } | 3760 void set_max_old_space_size(int value) { max_old_space_size_ = value; } |
| 3761 int max_executable_size() { return max_executable_size_; } | 3761 int max_executable_size() { return max_executable_size_; } |
| 3762 void set_max_executable_size(int value) { max_executable_size_ = value; } | 3762 void set_max_executable_size(int value) { max_executable_size_ = value; } |
| 3763 uint32_t* stack_limit() const { return stack_limit_; } | 3763 uint32_t* stack_limit() const { return stack_limit_; } |
| 3764 // Sets an address beyond which the VM's stack may not grow. | 3764 // Sets an address beyond which the VM's stack may not grow. |
| 3765 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } | 3765 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
| 3766 bool is_memory_constrained() { return is_memory_constrained_; } |
| 3767 // If set to true, V8 will limit it's memory usage, at the potential cost of |
| 3768 // lower performance. |
| 3769 void set_memory_constrained(bool value) { is_memory_constrained_ = value; } |
| 3766 private: | 3770 private: |
| 3767 int max_young_space_size_; | 3771 int max_young_space_size_; |
| 3768 int max_old_space_size_; | 3772 int max_old_space_size_; |
| 3769 int max_executable_size_; | 3773 int max_executable_size_; |
| 3770 uint32_t* stack_limit_; | 3774 uint32_t* stack_limit_; |
| 3775 bool is_memory_constrained_; |
| 3771 }; | 3776 }; |
| 3772 | 3777 |
| 3773 | 3778 |
| 3774 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); | 3779 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); |
| 3775 | 3780 |
| 3776 | 3781 |
| 3777 // --- Exceptions --- | 3782 // --- Exceptions --- |
| 3778 | 3783 |
| 3779 | 3784 |
| 3780 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 3785 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
| (...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6501 | 6506 |
| 6502 | 6507 |
| 6503 } // namespace v8 | 6508 } // namespace v8 |
| 6504 | 6509 |
| 6505 | 6510 |
| 6506 #undef V8EXPORT | 6511 #undef V8EXPORT |
| 6507 #undef TYPE_CHECK | 6512 #undef TYPE_CHECK |
| 6508 | 6513 |
| 6509 | 6514 |
| 6510 #endif // V8_H_ | 6515 #endif // V8_H_ |
| OLD | NEW |