OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 */ | 3180 */ |
3181 static void GetHeapStatistics(HeapStatistics* heap_statistics); | 3181 static void GetHeapStatistics(HeapStatistics* heap_statistics); |
3182 | 3182 |
3183 /** | 3183 /** |
3184 * Optional notification that the embedder is idle. | 3184 * Optional notification that the embedder is idle. |
3185 * V8 uses the notification to reduce memory footprint. | 3185 * V8 uses the notification to reduce memory footprint. |
3186 * This call can be used repeatedly if the embedder remains idle. | 3186 * This call can be used repeatedly if the embedder remains idle. |
3187 * Returns true if the embedder should stop calling IdleNotification | 3187 * Returns true if the embedder should stop calling IdleNotification |
3188 * until real work has been done. This indicates that V8 has done | 3188 * until real work has been done. This indicates that V8 has done |
3189 * as much cleanup as it will be able to do. | 3189 * as much cleanup as it will be able to do. |
| 3190 * |
| 3191 * The hint argument specifies the amount of work to be done in the function |
| 3192 * on scale from 1 to 1000. There is no guarantee that the actual work will |
| 3193 * match the hint. |
3190 */ | 3194 */ |
3191 static bool IdleNotification(); | 3195 static bool IdleNotification(int hint = 1000); |
3192 | 3196 |
3193 /** | 3197 /** |
3194 * Optional notification that the system is running low on memory. | 3198 * Optional notification that the system is running low on memory. |
3195 * V8 uses these notifications to attempt to free memory. | 3199 * V8 uses these notifications to attempt to free memory. |
3196 */ | 3200 */ |
3197 static void LowMemoryNotification(); | 3201 static void LowMemoryNotification(); |
3198 | 3202 |
3199 /** | 3203 /** |
3200 * Optional notification that a context has been disposed. V8 uses | 3204 * Optional notification that a context has been disposed. V8 uses |
3201 * these notifications to guide the GC heuristic. Returns the number | 3205 * these notifications to guide the GC heuristic. Returns the number |
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4221 | 4225 |
4222 | 4226 |
4223 } // namespace v8 | 4227 } // namespace v8 |
4224 | 4228 |
4225 | 4229 |
4226 #undef V8EXPORT | 4230 #undef V8EXPORT |
4227 #undef TYPE_CHECK | 4231 #undef TYPE_CHECK |
4228 | 4232 |
4229 | 4233 |
4230 #endif // V8_H_ | 4234 #endif // V8_H_ |
OLD | NEW |