summaryrefslogtreecommitdiffstats
path: root/cc/resources/memory_history.h
diff options
context:
space:
mode:
Diffstat (limited to 'cc/resources/memory_history.h')
-rw-r--r--cc/resources/memory_history.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/cc/resources/memory_history.h b/cc/resources/memory_history.h
index 570a3d0..daca10f 100644
--- a/cc/resources/memory_history.h
+++ b/cc/resources/memory_history.h
@@ -22,12 +22,17 @@ class MemoryHistory {
struct Entry {
Entry()
: total_budget_in_bytes(0),
- total_bytes_used(0),
- had_enough_memory(false) {}
+ bytes_allocated(0),
+ bytes_unreleasable(0),
+ bytes_over(0) {}
size_t total_budget_in_bytes;
- size_t total_bytes_used;
- bool had_enough_memory;
+ size_t bytes_allocated;
+ size_t bytes_unreleasable;
+ size_t bytes_over;
+ size_t bytes_total() const {
+ return bytes_allocated + bytes_unreleasable + bytes_over;
+ }
};
void SaveEntry(const Entry& entry);