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
6 changes: 3 additions & 3 deletions tcmalloc/internal/percpu_tcmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,9 @@ inline ABSL_ATTRIBUTE_ALWAYS_INLINE void* TcmallocSlab<NumClasses>::Pop(
TC_ASSERT(result);
TSANAcquire(result);

// The next pop will be from current-1, but because we prefetch the previous
// element we've already just read that, so prefetch current-2.
PrefetchSlabMemory(scratch + (current - 2) * sizeof(void*));
// The next pop will be from current-2, but because we prefetch the previous
// element we've already just read that, so prefetch current-3.
PrefetchSlabMemory(scratch + (current - 3) * sizeof(void*));
PrefetchNextObject(next);
return AssumeNotNull(result);
underflow_path:
Expand Down
Loading