Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index e32c104d484a7675a7e4700278390fa70a432d49..b8bbe7c4c62d66359808a570b3b402bfb469d32f 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -4901,6 +4901,26 @@ class V8_EXPORT HeapStatistics { |
| }; |
| +class HeapSpaceStatistics { |
| + public: |
| + HeapSpaceStatistics(); |
| + const char* space_name() { return space_name_; } |
| + size_t space_size() { return space_size_; } |
| + size_t space_used_size() { return space_used_size_; } |
| + size_t space_available_size() { return space_available_size_; } |
| + size_t physical_space_size() { return physical_space_size_; } |
| + |
| + private: |
| + const char* space_name_; |
| + size_t space_size_; |
| + size_t space_used_size_; |
| + size_t space_available_size_; |
| + size_t physical_space_size_; |
| + |
| + friend class Isolate; |
| +}; |
| + |
| + |
| class RetainedObjectInfo; |
| @@ -5263,6 +5283,22 @@ class V8_EXPORT Isolate { |
| void GetHeapStatistics(HeapStatistics* heap_statistics); |
| /** |
| + * Returns the number of spaces in the heap. |
| + */ |
| + int NumberOfHeapSpaces(); |
| + |
| + /** |
| + * Get the memory usage of a space in the heap. |
| + * |
| + * \param space_statistics the HeapSpaceStatistics object to fill in |
|
rmcilroy
2015/04/16 16:53:36
capitalize "The"
ssid
2015/04/16 17:27:06
Done.
|
| + * statistics. |
| + * \param index ranges from 0 - number of spaces in the heap (given by |
|
rmcilroy
2015/04/16 16:53:36
"\param index The index of the space to get statis
ssid
2015/04/16 17:27:06
Done.
|
| + * NumberOfHeapSpaces()). |
| + * \returns true on success. |
| + */ |
| + bool GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, int index); |
| + |
| + /** |
| * Get a call stack sample from the isolate. |
| * \param state Execution state. |
| * \param frames Caller allocated buffer to store stack frames. |