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

Side by Side Diff: include/v8.h

Issue 228923002: Allow the embedder to pass the virtual memory limit to v8 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 8 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 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 class V8_EXPORT ResourceConstraints { 3944 class V8_EXPORT ResourceConstraints {
3945 public: 3945 public:
3946 ResourceConstraints(); 3946 ResourceConstraints();
3947 3947
3948 /** 3948 /**
3949 * Configures the constraints with reasonable default values based on the 3949 * Configures the constraints with reasonable default values based on the
3950 * capabilities of the current device the VM is running on. 3950 * capabilities of the current device the VM is running on.
3951 * 3951 *
3952 * \param physical_memory The total amount of physical memory on the current 3952 * \param physical_memory The total amount of physical memory on the current
3953 * device, in bytes. 3953 * device, in bytes.
3954 * \param virtual_memory_limit The amount of virtual memory on the current
3955 * device, in bytes, or zero, if there is no limit.
3954 * \param number_of_processors The number of CPUs available on the current 3956 * \param number_of_processors The number of CPUs available on the current
3955 * device. 3957 * device.
3956 */ 3958 */
3957 void ConfigureDefaults(uint64_t physical_memory, 3959 void ConfigureDefaults(uint64_t physical_memory,
3960 uint64_t virtual_memory_limit,
3958 uint32_t number_of_processors); 3961 uint32_t number_of_processors);
3962 // Deprecated.
Paweł Hajdan Jr. 2014/04/17 13:59:53 Shouldn't this use V8_DEPRECATED?
jochen (gone - plz use gerrit) 2014/04/17 14:01:48 No, because then it wouldn't compile. We first hav
3963 void ConfigureDefaults(uint64_t physical_memory,
3964 uint32_t number_of_processors) {
3965 ConfigureDefaults(physical_memory, 0, number_of_processors);
3966 }
3959 3967
3960 int max_young_space_size() const { return max_young_space_size_; } 3968 int max_young_space_size() const { return max_young_space_size_; }
3961 void set_max_young_space_size(int value) { max_young_space_size_ = value; } 3969 void set_max_young_space_size(int value) { max_young_space_size_ = value; }
3962 int max_old_space_size() const { return max_old_space_size_; } 3970 int max_old_space_size() const { return max_old_space_size_; }
3963 void set_max_old_space_size(int value) { max_old_space_size_ = value; } 3971 void set_max_old_space_size(int value) { max_old_space_size_ = value; }
3964 int max_executable_size() const { return max_executable_size_; } 3972 int max_executable_size() const { return max_executable_size_; }
3965 void set_max_executable_size(int value) { max_executable_size_ = value; } 3973 void set_max_executable_size(int value) { max_executable_size_ = value; }
3966 uint32_t* stack_limit() const { return stack_limit_; } 3974 uint32_t* stack_limit() const { return stack_limit_; }
3967 // Sets an address beyond which the VM's stack may not grow. 3975 // Sets an address beyond which the VM's stack may not grow.
3968 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } 3976 void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
3969 int max_available_threads() const { return max_available_threads_; } 3977 int max_available_threads() const { return max_available_threads_; }
3970 // Set the number of threads available to V8, assuming at least 1. 3978 // Set the number of threads available to V8, assuming at least 1.
3971 void set_max_available_threads(int value) { 3979 void set_max_available_threads(int value) {
3972 max_available_threads_ = value; 3980 max_available_threads_ = value;
3973 } 3981 }
3982 int code_range_size() const { return code_range_size_; }
3983 void set_code_range_size(int value) {
3984 code_range_size_ = value;
3985 }
3974 3986
3975 private: 3987 private:
3976 int max_young_space_size_; 3988 int max_young_space_size_;
3977 int max_old_space_size_; 3989 int max_old_space_size_;
3978 int max_executable_size_; 3990 int max_executable_size_;
3979 uint32_t* stack_limit_; 3991 uint32_t* stack_limit_;
3980 int max_available_threads_; 3992 int max_available_threads_;
3993 int code_range_size_;
3981 }; 3994 };
3982 3995
3983 3996
3984 /** 3997 /**
3985 * Sets the given ResourceConstraints on the given Isolate. 3998 * Sets the given ResourceConstraints on the given Isolate.
3986 */ 3999 */
3987 bool V8_EXPORT SetResourceConstraints(Isolate* isolate, 4000 bool V8_EXPORT SetResourceConstraints(Isolate* isolate,
3988 ResourceConstraints* constraints); 4001 ResourceConstraints* constraints);
3989 4002
3990 4003
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
6689 */ 6702 */
6690 6703
6691 6704
6692 } // namespace v8 6705 } // namespace v8
6693 6706
6694 6707
6695 #undef TYPE_CHECK 6708 #undef TYPE_CHECK
6696 6709
6697 6710
6698 #endif // V8_H_ 6711 #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