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

Unified Diff: net/base/arena.cc

Issue 2611173004: Modify SpdyHeaderBlock's internals to consolidate header values only on first access. (Closed)
Patch Set: Rebase. Created 3 years, 11 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/base/arena.h ('k') | net/spdy/spdy_header_block.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/arena.cc
diff --git a/net/base/arena.cc b/net/base/arena.cc
index eeb286337be3a16c8940265647bd6c8fcf0fa6f9..3bf29a79fca4e5e730bccccbc9d9b8903d3f4741 100644
--- a/net/base/arena.cc
+++ b/net/base/arena.cc
@@ -68,6 +68,7 @@ void UnsafeArena::Free(char* data, size_t size) {
void UnsafeArena::Reset() {
blocks_.clear();
+ status_.bytes_allocated_ = 0;
}
void UnsafeArena::Reserve(size_t additional_space) {
@@ -83,6 +84,7 @@ void UnsafeArena::Reserve(size_t additional_space) {
void UnsafeArena::AllocBlock(size_t size) {
blocks_.push_back(Block(size));
+ status_.bytes_allocated_ += size;
}
UnsafeArena::Block::Block(size_t s) : data(new char[s]), size(s), used(0) {}
« no previous file with comments | « net/base/arena.h ('k') | net/spdy/spdy_header_block.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698