Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tcmalloc/thread_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,8 @@ void ThreadCache::BecomeIdle() {
if (heap->in_setspecific_) return; // Do not disturb the active caller

heap->in_setspecific_ = true;
PerCpuState::state().RegisterThreadCache(nullptr);
// Also update the copy in __thread
thread_local_data_ = nullptr;
PerCpuState::state().RegisterThreadCache(nullptr);
heap->in_setspecific_ = false;
if (GetCacheIfPresent() == heap) {
// Somehow heap got reinstated by a recursive call to malloc
Expand Down
Loading