aboutsummaryrefslogtreecommitdiff
path: root/lldb/include/lldb/Utility/ConstString.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Utility/ConstString.h')
-rw-r--r--lldb/include/lldb/Utility/ConstString.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/lldb/include/lldb/Utility/ConstString.h b/lldb/include/lldb/Utility/ConstString.h
index 2756f1fd7203..31887d7f6115 100644
--- a/lldb/include/lldb/Utility/ConstString.h
+++ b/lldb/include/lldb/Utility/ConstString.h
@@ -394,19 +394,17 @@ public:
///
/// \return
/// The number of bytes that this object occupies in memory.
- ///
- /// \see ConstString::StaticMemorySize ()
size_t MemorySize() const { return sizeof(ConstString); }
- /// Get the size in bytes of the current global string pool.
- ///
- /// Reports the size in bytes of all shared C string values, containers and
- /// any other values as a byte size for the entire string pool.
- ///
- /// \return
- /// The number of bytes that the global string pool occupies
- /// in memory.
- static size_t StaticMemorySize();
+ struct MemoryStats {
+ size_t GetBytesTotal() const { return bytes_total; }
+ size_t GetBytesUsed() const { return bytes_used; }
+ size_t GetBytesUnused() const { return bytes_total - bytes_used; }
+ size_t bytes_total = 0;
+ size_t bytes_used = 0;
+ };
+
+ static MemoryStats GetMemoryStats();
protected:
template <typename T, typename Enable> friend struct ::llvm::DenseMapInfo;