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

Side by Side Diff: include/v8.h

Issue 68203003: Enable physical memory argument to be passed as an argument to ConfigureResourceConstraintsForPlatf… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 1 month 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 | include/v8-defaults.h » ('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 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after
3796 * You must set the heap size before initializing the VM - the size cannot be 3796 * You must set the heap size before initializing the VM - the size cannot be
3797 * adjusted after the VM is initialized. 3797 * adjusted after the VM is initialized.
3798 * 3798 *
3799 * If you are using threads then you should hold the V8::Locker lock while 3799 * If you are using threads then you should hold the V8::Locker lock while
3800 * setting the stack limit and you must set a non-default stack limit separately 3800 * setting the stack limit and you must set a non-default stack limit separately
3801 * for each thread. 3801 * for each thread.
3802 */ 3802 */
3803 class V8_EXPORT ResourceConstraints { 3803 class V8_EXPORT ResourceConstraints {
3804 public: 3804 public:
3805 ResourceConstraints(); 3805 ResourceConstraints();
3806
3807 /**
3808 * Configures the constraints with reasonable default values based on the
3809 * capabilities of the current device the VM is running on.
3810 *
3811 * \param physical_memory The total amount of physical memory on the current
3812 * device, in bytes.
3813 */
3814 void ConfigureDefaults(uint64_t physical_memory);
3815
3806 int max_young_space_size() const { return max_young_space_size_; } 3816 int max_young_space_size() const { return max_young_space_size_; }
3807 void set_max_young_space_size(int value) { max_young_space_size_ = value; } 3817 void set_max_young_space_size(int value) { max_young_space_size_ = value; }
3808 int max_old_space_size() const { return max_old_space_size_; } 3818 int max_old_space_size() const { return max_old_space_size_; }
3809 void set_max_old_space_size(int value) { max_old_space_size_ = value; } 3819 void set_max_old_space_size(int value) { max_old_space_size_ = value; }
3810 int max_executable_size() { return max_executable_size_; } 3820 int max_executable_size() { return max_executable_size_; }
3811 void set_max_executable_size(int value) { max_executable_size_ = value; } 3821 void set_max_executable_size(int value) { max_executable_size_ = value; }
3812 uint32_t* stack_limit() const { return stack_limit_; } 3822 uint32_t* stack_limit() const { return stack_limit_; }
3813 // Sets an address beyond which the VM's stack may not grow. 3823 // Sets an address beyond which the VM's stack may not grow.
3814 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } 3824 void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
3815 3825
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
6537 */ 6547 */
6538 6548
6539 6549
6540 } // namespace v8 6550 } // namespace v8
6541 6551
6542 6552
6543 #undef TYPE_CHECK 6553 #undef TYPE_CHECK
6544 6554
6545 6555
6546 #endif // V8_H_ 6556 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-defaults.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698