OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 20 matching lines...) Expand all Loading... |
31 #include "v8.h" | 31 #include "v8.h" |
32 | 32 |
33 /** | 33 /** |
34 * Default configuration support for the V8 JavaScript engine. | 34 * Default configuration support for the V8 JavaScript engine. |
35 */ | 35 */ |
36 namespace v8 { | 36 namespace v8 { |
37 | 37 |
38 /** | 38 /** |
39 * Configures the constraints with reasonable default values based on the | 39 * Configures the constraints with reasonable default values based on the |
40 * capabilities of the current device the VM is running on. | 40 * capabilities of the current device the VM is running on. |
| 41 * |
| 42 * \param constraints The constraints object to update |
| 43 * \param physical_memory The total amount of physical memory on the current |
| 44 * device, in bytes. |
41 */ | 45 */ |
42 bool V8_EXPORT ConfigureResourceConstraintsForCurrentPlatform( | 46 bool V8_EXPORT ConfigureDefaultResourceConstraints( |
43 ResourceConstraints* constraints); | 47 ResourceConstraints* constraints, uint64_t physical_memory); |
44 | 48 |
45 | 49 |
46 /** | 50 V8_DEPRECATED("Use ConfigureDefaultResourceConstraints instead", |
47 * Convience function which performs SetResourceConstraints with the settings | 51 bool V8_EXPORT ConfigureResourceConstraintsForCurrentPlatform( |
48 * returned by ConfigureResourceConstraintsForCurrentPlatform. | 52 ResourceConstraints* constraints)); |
49 */ | 53 |
50 bool V8_EXPORT SetDefaultResourceConstraintsForCurrentPlatform(); | 54 |
| 55 V8_DEPRECATED("Use ConfigureDefaultResourceConstraints instead", |
| 56 bool V8_EXPORT SetDefaultResourceConstraintsForCurrentPlatform()); |
51 | 57 |
52 } // namespace v8 | 58 } // namespace v8 |
53 | 59 |
54 #endif // V8_V8_DEFAULTS_H_ | 60 #endif // V8_V8_DEFAULTS_H_ |
OLD | NEW |