Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: include/v8.h

Issue 24018009: Add -optimize-for-size flag to optimize for memory size (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: change to optimize-for-size Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 3748
3756 private: 3749 private:
3757 int max_young_space_size_; 3750 int max_young_space_size_;
3758 int max_old_space_size_; 3751 int max_old_space_size_;
3759 int max_executable_size_; 3752 int max_executable_size_;
3760 uint32_t* stack_limit_; 3753 uint32_t* stack_limit_;
3761 Maybe<bool> is_memory_constrained_;
3762 }; 3754 };
3763 3755
3764 3756
3765 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); 3757 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints);
3766 3758
3767 3759
3768 // --- Exceptions --- 3760 // --- Exceptions ---
3769 3761
3770 3762
3771 typedef void (*FatalErrorCallback)(const char* location, const char* message); 3763 typedef void (*FatalErrorCallback)(const char* location, const char* message);
(...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after
6455 */ 6447 */
6456 6448
6457 6449
6458 } // namespace v8 6450 } // namespace v8
6459 6451
6460 6452
6461 #undef TYPE_CHECK 6453 #undef TYPE_CHECK
6462 6454
6463 6455
6464 #endif // V8_H_ 6456 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698