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

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

Issue 9323026: [NOT TO COMMIT!] r109: Diff of the current tcmalloc from the original google-perftools r109. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 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
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..a951f77c4e0a5c3c0c4a43fdb0d399800d7e908d 100644
--- a/third_party/tcmalloc/chromium/src/thread_cache.cc
+++ b/third_party/tcmalloc/chromium/src/thread_cache.cc
@@ -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.
+ void *second = start;
+ start = FL_Pop(&second);
+ list->PushRange(fetch_count, second, end);
}
// Increase max length slowly up to batch_size. After that,
« no previous file with comments | « third_party/tcmalloc/chromium/src/thread_cache.h ('k') | third_party/tcmalloc/chromium/src/windows/addr2line-pdb.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698