| 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 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 * | 2508 * |
| 2509 * Instances of this class can be passed to v8::V8::HeapStatistics to | 2509 * Instances of this class can be passed to v8::V8::HeapStatistics to |
| 2510 * get heap statistics from V8. | 2510 * get heap statistics from V8. |
| 2511 */ | 2511 */ |
| 2512 class V8EXPORT HeapStatistics { | 2512 class V8EXPORT HeapStatistics { |
| 2513 public: | 2513 public: |
| 2514 HeapStatistics(); | 2514 HeapStatistics(); |
| 2515 size_t total_heap_size() { return total_heap_size_; } | 2515 size_t total_heap_size() { return total_heap_size_; } |
| 2516 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 2516 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
| 2517 size_t used_heap_size() { return used_heap_size_; } | 2517 size_t used_heap_size() { return used_heap_size_; } |
| 2518 size_t heap_size_limit() { return heap_size_limit_; } |
| 2518 | 2519 |
| 2519 private: | 2520 private: |
| 2520 void set_total_heap_size(size_t size) { total_heap_size_ = size; } | 2521 void set_total_heap_size(size_t size) { total_heap_size_ = size; } |
| 2521 void set_total_heap_size_executable(size_t size) { | 2522 void set_total_heap_size_executable(size_t size) { |
| 2522 total_heap_size_executable_ = size; | 2523 total_heap_size_executable_ = size; |
| 2523 } | 2524 } |
| 2524 void set_used_heap_size(size_t size) { used_heap_size_ = size; } | 2525 void set_used_heap_size(size_t size) { used_heap_size_ = size; } |
| 2526 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; } |
| 2525 | 2527 |
| 2526 size_t total_heap_size_; | 2528 size_t total_heap_size_; |
| 2527 size_t total_heap_size_executable_; | 2529 size_t total_heap_size_executable_; |
| 2528 size_t used_heap_size_; | 2530 size_t used_heap_size_; |
| 2531 size_t heap_size_limit_; |
| 2529 | 2532 |
| 2530 friend class V8; | 2533 friend class V8; |
| 2531 }; | 2534 }; |
| 2532 | 2535 |
| 2533 | 2536 |
| 2534 /** | 2537 /** |
| 2535 * Container class for static utility functions. | 2538 * Container class for static utility functions. |
| 2536 */ | 2539 */ |
| 2537 class V8EXPORT V8 { | 2540 class V8EXPORT V8 { |
| 2538 public: | 2541 public: |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3794 | 3797 |
| 3795 | 3798 |
| 3796 } // namespace v8 | 3799 } // namespace v8 |
| 3797 | 3800 |
| 3798 | 3801 |
| 3799 #undef V8EXPORT | 3802 #undef V8EXPORT |
| 3800 #undef TYPE_CHECK | 3803 #undef TYPE_CHECK |
| 3801 | 3804 |
| 3802 | 3805 |
| 3803 #endif // V8_H_ | 3806 #endif // V8_H_ |
| OLD | NEW |