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

Unified Diff: net/spdy/hpack/hpack_huffman_table.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: rebased Created 3 years, 10 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 | « net/spdy/hpack/hpack_huffman_table.h ('k') | net/spdy/hpack/hpack_output_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_huffman_table.cc
diff --git a/net/spdy/hpack/hpack_huffman_table.cc b/net/spdy/hpack/hpack_huffman_table.cc
index 0e3ca1b060eb5f49178ab881724dc6da60bf5b57..2d361db76000853a353aa2471c88214f49dfa0ed 100644
--- a/net/spdy/hpack/hpack_huffman_table.cc
+++ b/net/spdy/hpack/hpack_huffman_table.cc
@@ -12,6 +12,7 @@
#include "base/numerics/safe_conversions.h"
#include "net/spdy/hpack/hpack_input_stream.h"
#include "net/spdy/hpack/hpack_output_stream.h"
+#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
namespace net {
@@ -318,4 +319,11 @@ bool HpackHuffmanTable::GenericDecodeString(HpackInputStream* in,
return false;
}
+size_t HpackHuffmanTable::EstimateMemoryUsage() const {
+ return SpdyEstimateMemoryUsage(decode_tables_) +
+ SpdyEstimateMemoryUsage(decode_entries_) +
+ SpdyEstimateMemoryUsage(code_by_id_) +
+ SpdyEstimateMemoryUsage(length_by_id_);
+}
+
} // namespace net
« no previous file with comments | « net/spdy/hpack/hpack_huffman_table.h ('k') | net/spdy/hpack/hpack_output_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698