| OLD | NEW |
| 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 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3907 | 3907 |
| 3908 /** | 3908 /** |
| 3909 * Collection of V8 heap information. | 3909 * Collection of V8 heap information. |
| 3910 * | 3910 * |
| 3911 * Instances of this class can be passed to v8::V8::HeapStatistics to | 3911 * Instances of this class can be passed to v8::V8::HeapStatistics to |
| 3912 * get heap statistics from V8. | 3912 * get heap statistics from V8. |
| 3913 */ | 3913 */ |
| 3914 class V8_EXPORT HeapStatistics { | 3914 class V8_EXPORT HeapStatistics { |
| 3915 public: | 3915 public: |
| 3916 HeapStatistics(); | 3916 HeapStatistics(); |
| 3917 size_t total_heap_size() { return total_heap_size_; } | 3917 V8_INLINE size_t total_heap_size() const; |
| 3918 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 3918 V8_INLINE size_t total_heap_size_executable() const; |
| 3919 size_t total_physical_size() { return total_physical_size_; } | 3919 V8_INLINE size_t total_physical_size() const; |
| 3920 size_t used_heap_size() { return used_heap_size_; } | 3920 V8_INLINE size_t used_heap_size() const; |
| 3921 size_t heap_size_limit() { return heap_size_limit_; } | 3921 V8_INLINE size_t heap_size_limit() const; |
| 3922 | 3922 |
| 3923 private: | 3923 private: |
| 3924 size_t total_heap_size_; | 3924 size_t total_heap_size_; |
| 3925 size_t total_heap_size_executable_; | 3925 size_t total_heap_size_executable_; |
| 3926 size_t total_physical_size_; | 3926 size_t total_physical_size_; |
| 3927 size_t used_heap_size_; | 3927 size_t used_heap_size_; |
| 3928 size_t heap_size_limit_; | 3928 size_t heap_size_limit_; |
| 3929 | 3929 |
| 3930 friend class V8; | 3930 friend class V8; |
| 3931 friend class Isolate; | 3931 friend class Isolate; |
| (...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6487 void* Context::GetAlignedPointerFromEmbedderData(int index) { | 6487 void* Context::GetAlignedPointerFromEmbedderData(int index) { |
| 6488 #ifndef V8_ENABLE_CHECKS | 6488 #ifndef V8_ENABLE_CHECKS |
| 6489 typedef internal::Internals I; | 6489 typedef internal::Internals I; |
| 6490 return I::ReadEmbedderData<void*>(this, index); | 6490 return I::ReadEmbedderData<void*>(this, index); |
| 6491 #else | 6491 #else |
| 6492 return SlowGetAlignedPointerFromEmbedderData(index); | 6492 return SlowGetAlignedPointerFromEmbedderData(index); |
| 6493 #endif | 6493 #endif |
| 6494 } | 6494 } |
| 6495 | 6495 |
| 6496 | 6496 |
| 6497 size_t HeapStatistics::total_heap_size() const { |
| 6498 return total_heap_size_; |
| 6499 } |
| 6500 |
| 6501 |
| 6502 size_t HeapStatistics::total_heap_size_executable() const { |
| 6503 return total_heap_size_executable_; |
| 6504 } |
| 6505 |
| 6506 |
| 6507 size_t HeapStatistics::total_physical_size() const { |
| 6508 return total_physical_size_; |
| 6509 } |
| 6510 |
| 6511 |
| 6512 size_t HeapStatistics::used_heap_size() const { |
| 6513 return used_heap_size_; |
| 6514 } |
| 6515 |
| 6516 |
| 6517 size_t HeapStatistics::heap_size_limit() const { |
| 6518 return heap_size_limit_; |
| 6519 } |
| 6520 |
| 6521 |
| 6497 /** | 6522 /** |
| 6498 * \example shell.cc | 6523 * \example shell.cc |
| 6499 * A simple shell that takes a list of expressions on the | 6524 * A simple shell that takes a list of expressions on the |
| 6500 * command-line and executes them. | 6525 * command-line and executes them. |
| 6501 */ | 6526 */ |
| 6502 | 6527 |
| 6503 | 6528 |
| 6504 /** | 6529 /** |
| 6505 * \example process.cc | 6530 * \example process.cc |
| 6506 */ | 6531 */ |
| 6507 | 6532 |
| 6508 | 6533 |
| 6509 } // namespace v8 | 6534 } // namespace v8 |
| 6510 | 6535 |
| 6511 | 6536 |
| 6512 #undef TYPE_CHECK | 6537 #undef TYPE_CHECK |
| 6513 | 6538 |
| 6514 | 6539 |
| 6515 #endif // V8_H_ | 6540 #endif // V8_H_ |
| OLD | NEW |