Index: src/list.h |
diff --git a/src/list.h b/src/list.h |
index ea67b8b0c6ce487b70ef031411975bebdf8b49ab..6ba55b64ac30d4abb360125ee1398eaa18a3e256 100644 |
--- a/src/list.h |
+++ b/src/list.h |
@@ -196,6 +196,13 @@ class List { |
DISALLOW_COPY_AND_ASSIGN(List); |
}; |
+ |
+template<typename T, class P> |
+size_t GetMemoryUsedByList(const List<T, P>& list) { |
+ return list.length() * sizeof(T) + sizeof(list); |
+} |
+ |
+ |
class Map; |
class Type; |
class Code; |