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

Side by Side Diff: include/v8.h

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Move device-specific defaults into ConfigureResourceConstraintsForCurrentPlatform Created 7 years, 2 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') | src/api.cc » ('J')
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 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 3755
3756 private: 3756 private:
3757 int max_young_space_size_; 3757 int max_young_space_size_;
3758 int max_old_space_size_; 3758 int max_old_space_size_;
3759 int max_executable_size_; 3759 int max_executable_size_;
3760 uint32_t* stack_limit_; 3760 uint32_t* stack_limit_;
3761 Maybe<bool> is_memory_constrained_; 3761 Maybe<bool> is_memory_constrained_;
3762 }; 3762 };
3763 3763
3764 3764
3765 /**
3766 * Sets the given ResourceConstraints on the current isolate.
3767 */
3765 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints); 3768 bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints);
3766 3769
3767 3770
3771 /**
3772 * Configures the constraints with reasonable default values based on the
3773 * capabilities of the current device the VM is running on.
3774 */
3775 bool V8_EXPORT ConfigureResourceConstraintsForCurrentPlatform(
3776 ResourceConstraints* constraints);
3777
3778
3779 /**
3780 * Convience function which performs SetResourceConstraints with the settings
3781 * returned by ConfigureResourceConstraintsForCurrentPlatform.
3782 */
3783 bool V8_EXPORT SetDefaultResourceConstraintsForCurrentPlatform();
3784
3785
3768 // --- Exceptions --- 3786 // --- Exceptions ---
3769 3787
3770 3788
3771 typedef void (*FatalErrorCallback)(const char* location, const char* message); 3789 typedef void (*FatalErrorCallback)(const char* location, const char* message);
3772 3790
3773 3791
3774 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error); 3792 typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error);
3775 3793
3776 3794
3777 /** 3795 /**
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
6455 */ 6473 */
6456 6474
6457 6475
6458 } // namespace v8 6476 } // namespace v8
6459 6477
6460 6478
6461 #undef TYPE_CHECK 6479 #undef TYPE_CHECK
6462 6480
6463 6481
6464 #endif // V8_H_ 6482 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698