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

Unified Diff: third_party/tcmalloc/chromium/src/thread_cache.cc

Issue 7671034: doubly-linked free-lists for thread caches and page heaps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: code style fixes Created 9 years, 4 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
Index: third_party/tcmalloc/chromium/src/thread_cache.cc
diff --git a/third_party/tcmalloc/chromium/src/thread_cache.cc b/third_party/tcmalloc/chromium/src/thread_cache.cc
index b00e3b40f50a94775561cae571293beda6b7d493..d54bd84c610e9bb5c3b5ada03673f64f6060cac9 100644
--- a/third_party/tcmalloc/chromium/src/thread_cache.cc
+++ b/third_party/tcmalloc/chromium/src/thread_cache.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2008, Google Inc.
+// Copyright (c) 2011, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -153,7 +153,10 @@ void* ThreadCache::FetchFromCentralCache(size_t cl, size_t byte_size) {
ASSERT((start == NULL) == (fetch_count == 0));
if (--fetch_count >= 0) {
size_ += byte_size * fetch_count;
- list->PushRange(fetch_count, SLL_Next(start), end);
+ // Pop the top of the list and add the rest to the freelist
jar (doing other things) 2011/08/20 02:40:30 nit: This file they do use periods at the end of t
bxx 2011/08/24 00:19:24 Done. Although they do not consistently use perio
+ void *next = start;
jar (doing other things) 2011/08/20 02:40:30 Perhaps a better name than |next| would be |second
bxx 2011/08/24 00:19:24 Done.
+ start = FL_Pop(&next);
+ list->PushRange(fetch_count, next, end);
}
// Increase max length slowly up to batch_size. After that,

Powered by Google App Engine
This is Rietveld 408576698