Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: courgette/memory_allocator.h

Issue 2883773002: [Courgette Experiment] Track and print TempMapping total and peak allocation to measure Courgette d…
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/memory_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/memory_allocator.h
diff --git a/courgette/memory_allocator.h b/courgette/memory_allocator.h
index e332a32cee170852600bd4c39f17415d04022171..b7fa70b89708b9b37b3351b23feaa861496deebc 100644
--- a/courgette/memory_allocator.h
+++ b/courgette/memory_allocator.h
@@ -117,6 +117,10 @@ class FileMapping {
// you can get a pointer to the TempMapping instance that owns that memory.
class TempMapping {
public:
+ static long long alloc_cur;
+ static long long alloc_sum;
+ static long long alloc_max;
+
TempMapping();
~TempMapping();
@@ -138,6 +142,8 @@ class TempMapping {
protected:
base::File file_;
FileMapping mapping_;
+
+ size_t size_ = 0;
};
// A memory allocator class that allocates memory either from the heap or via a
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/memory_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698