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 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3738 ResourceConstraints(); | 3738 ResourceConstraints(); |
3739 int max_young_space_size() const { return max_young_space_size_; } | 3739 int max_young_space_size() const { return max_young_space_size_; } |
3740 void set_max_young_space_size(int value) { max_young_space_size_ = value; } | 3740 void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
3741 int max_old_space_size() const { return max_old_space_size_; } | 3741 int max_old_space_size() const { return max_old_space_size_; } |
3742 void set_max_old_space_size(int value) { max_old_space_size_ = value; } | 3742 void set_max_old_space_size(int value) { max_old_space_size_ = value; } |
3743 int max_executable_size() { return max_executable_size_; } | 3743 int max_executable_size() { return max_executable_size_; } |
3744 void set_max_executable_size(int value) { max_executable_size_ = value; } | 3744 void set_max_executable_size(int value) { max_executable_size_ = value; } |
3745 uint32_t* stack_limit() const { return stack_limit_; } | 3745 uint32_t* stack_limit() const { return stack_limit_; } |
3746 // Sets an address beyond which the VM's stack may not grow. | 3746 // Sets an address beyond which the VM's stack may not grow. |
3747 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } | 3747 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
3748 Maybe<bool> is_memory_constrained() const { return is_memory_constrained_; } | |
3749 // If set to true, V8 will limit it's memory usage, at the potential cost of | |
3750 // lower performance. Note, this option is a tentative addition to the API | |
3751 // and may be removed or modified without warning. | |
3752 void set_memory_constrained(bool value) { | |
3753 is_memory_constrained_ = Maybe<bool>(value); | |
3754 } | |
3755 | |
Hannes Payer (out of office)
2013/09/23 11:38:43
Let's keep the last newline
rmcilroy
2013/09/23 12:40:15
Done
| |
3756 private: | 3748 private: |
3757 int max_young_space_size_; | 3749 int max_young_space_size_; |
3758 int max_old_space_size_; | 3750 int max_old_space_size_; |
3759 int max_executable_size_; | 3751 int max_executable_size_; |
3760 uint32_t* stack_limit_; | 3752 uint32_t* stack_limit_; |
3761 Maybe<bool> is_memory_constrained_; | |
3762 }; | 3753 }; |
3763 | 3754 |
3764 | 3755 |
3765 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); | 3756 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); |
3766 | 3757 |
3767 | 3758 |
3768 // --- Exceptions --- | 3759 // --- Exceptions --- |
3769 | 3760 |
3770 | 3761 |
3771 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 3762 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
(...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6455 */ | 6446 */ |
6456 | 6447 |
6457 | 6448 |
6458 } // namespace v8 | 6449 } // namespace v8 |
6459 | 6450 |
6460 | 6451 |
6461 #undef TYPE_CHECK | 6452 #undef TYPE_CHECK |
6462 | 6453 |
6463 | 6454 |
6464 #endif // V8_H_ | 6455 #endif // V8_H_ |
OLD | NEW |