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

Unified Diff: third_party/tcmalloc/chromium/src/tcmalloc.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: enable doubly linked lists only in Debug builds Created 9 years, 3 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/tcmalloc.cc
diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc
index e88f983292714c2afa2be6e939c5ae0958cdc894..4afe5e7193b4df0195b027639a2f80d48ef873c9 100644
--- a/third_party/tcmalloc/chromium/src/tcmalloc.cc
+++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc
@@ -122,8 +122,8 @@
#include "base/spinlock.h" // for SpinLockHolder
#include "central_freelist.h" // for CentralFreeListPadded
#include "common.h" // for StackTrace, kPageShift, etc
+#include "free_list.h" // for FL_Init
#include "internal_logging.h" // for ASSERT, TCMalloc_Printer, etc
-#include "linked_list.h" // for SLL_SetNext
#include "malloc_hook-inl.h" // for MallocHook::InvokeNewHook, etc
#include "page_heap.h" // for PageHeap, PageHeap::Stats
#include "page_heap_allocator.h" // for PageHeapAllocator
@@ -1227,7 +1227,7 @@ inline void do_free_with_callback(void* ptr, void (*invalid_free_fn)(void*)) {
heap->Deallocate(ptr, cl);
} else {
// Delete directly into central cache
- tcmalloc::SLL_SetNext(ptr, NULL);
+ tcmalloc::FL_Init(ptr);
Static::central_cache()[cl].InsertRange(ptr, ptr, 1);
}
} else {
« no previous file with comments | « third_party/tcmalloc/chromium/src/page_heap_allocator.h ('k') | third_party/tcmalloc/chromium/src/thread_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698