OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2341 * setting the stack limit and you must set a non-default stack limit separately | 2341 * setting the stack limit and you must set a non-default stack limit separately |
2342 * for each thread. | 2342 * for each thread. |
2343 */ | 2343 */ |
2344 class V8EXPORT ResourceConstraints { | 2344 class V8EXPORT ResourceConstraints { |
2345 public: | 2345 public: |
2346 ResourceConstraints(); | 2346 ResourceConstraints(); |
2347 int max_young_space_size() const { return max_young_space_size_; } | 2347 int max_young_space_size() const { return max_young_space_size_; } |
2348 void set_max_young_space_size(int value) { max_young_space_size_ = value; } | 2348 void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
2349 int max_old_space_size() const { return max_old_space_size_; } | 2349 int max_old_space_size() const { return max_old_space_size_; } |
2350 void set_max_old_space_size(int value) { max_old_space_size_ = value; } | 2350 void set_max_old_space_size(int value) { max_old_space_size_ = value; } |
| 2351 int max_executable_size() { return max_executable_size_; } |
| 2352 void set_max_executable_size(int value) { max_executable_size_ = value; } |
2351 uint32_t* stack_limit() const { return stack_limit_; } | 2353 uint32_t* stack_limit() const { return stack_limit_; } |
2352 // Sets an address beyond which the VM's stack may not grow. | 2354 // Sets an address beyond which the VM's stack may not grow. |
2353 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } | 2355 void set_stack_limit(uint32_t* value) { stack_limit_ = value; } |
2354 private: | 2356 private: |
2355 int max_young_space_size_; | 2357 int max_young_space_size_; |
2356 int max_old_space_size_; | 2358 int max_old_space_size_; |
| 2359 int max_executable_size_; |
2357 uint32_t* stack_limit_; | 2360 uint32_t* stack_limit_; |
2358 }; | 2361 }; |
2359 | 2362 |
2360 | 2363 |
2361 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); | 2364 bool V8EXPORT SetResourceConstraints(ResourceConstraints* constraints); |
2362 | 2365 |
2363 | 2366 |
2364 // --- E x c e p t i o n s --- | 2367 // --- E x c e p t i o n s --- |
2365 | 2368 |
2366 | 2369 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 /** | 2481 /** |
2479 * Collection of V8 heap information. | 2482 * Collection of V8 heap information. |
2480 * | 2483 * |
2481 * Instances of this class can be passed to v8::V8::HeapStatistics to | 2484 * Instances of this class can be passed to v8::V8::HeapStatistics to |
2482 * get heap statistics from V8. | 2485 * get heap statistics from V8. |
2483 */ | 2486 */ |
2484 class V8EXPORT HeapStatistics { | 2487 class V8EXPORT HeapStatistics { |
2485 public: | 2488 public: |
2486 HeapStatistics(); | 2489 HeapStatistics(); |
2487 size_t total_heap_size() { return total_heap_size_; } | 2490 size_t total_heap_size() { return total_heap_size_; } |
| 2491 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
2488 size_t used_heap_size() { return used_heap_size_; } | 2492 size_t used_heap_size() { return used_heap_size_; } |
2489 | 2493 |
2490 private: | 2494 private: |
2491 void set_total_heap_size(size_t size) { total_heap_size_ = size; } | 2495 void set_total_heap_size(size_t size) { total_heap_size_ = size; } |
| 2496 void set_total_heap_size_executable(size_t size) { |
| 2497 total_heap_size_executable_ = size; |
| 2498 } |
2492 void set_used_heap_size(size_t size) { used_heap_size_ = size; } | 2499 void set_used_heap_size(size_t size) { used_heap_size_ = size; } |
2493 | 2500 |
2494 size_t total_heap_size_; | 2501 size_t total_heap_size_; |
| 2502 size_t total_heap_size_executable_; |
2495 size_t used_heap_size_; | 2503 size_t used_heap_size_; |
2496 | 2504 |
2497 friend class V8; | 2505 friend class V8; |
2498 }; | 2506 }; |
2499 | 2507 |
2500 | 2508 |
2501 /** | 2509 /** |
2502 * Container class for static utility functions. | 2510 * Container class for static utility functions. |
2503 */ | 2511 */ |
2504 class V8EXPORT V8 { | 2512 class V8EXPORT V8 { |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 | 3739 |
3732 | 3740 |
3733 } // namespace v8 | 3741 } // namespace v8 |
3734 | 3742 |
3735 | 3743 |
3736 #undef V8EXPORT | 3744 #undef V8EXPORT |
3737 #undef TYPE_CHECK | 3745 #undef TYPE_CHECK |
3738 | 3746 |
3739 | 3747 |
3740 #endif // V8_H_ | 3748 #endif // V8_H_ |
OLD | NEW |