[compiler-rt] ce811fb - [NFCI][scudo] Remove unused variable 'MaxCount' (#100201)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 14:01:52 PDT 2024


Author: Thurston Dang
Date: 2024-07-23T14:01:48-07:00
New Revision: ce811fb6d94e1d4af1fd1f52fbf109bc34834970

URL: https://github.com/llvm/llvm-project/commit/ce811fb6d94e1d4af1fd1f52fbf109bc34834970
DIFF: https://github.com/llvm/llvm-project/commit/ce811fb6d94e1d4af1fd1f52fbf109bc34834970.diff

LOG: [NFCI][scudo] Remove unused variable 'MaxCount' (#100201)

Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]",
which is no longer used after
https://github.com/llvm/llvm-project/pull/99409

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/secondary.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index b8e12db934963..d8505742d6054 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -332,7 +332,6 @@ template <typename Config> class MapAllocatorCache {
   bool retrieve(Options Options, uptr Size, uptr Alignment, uptr HeadersSize,
                 LargeBlock::Header **H, bool *Zeroed) EXCLUDES(Mutex) {
     const uptr PageSize = getPageSizeCached();
-    const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount);
     // 10% of the requested size proved to be the optimal choice for
     // retrieving cached blocks after testing several options.
     constexpr u32 FragmentedBytesDivisor = 10;
@@ -449,7 +448,6 @@ template <typename Config> class MapAllocatorCache {
         Quarantine[I].invalidate();
       }
     }
-    const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount);
     for (u32 I = LRUHead; I != CachedBlock::InvalidEntry; I = Entries[I].Next) {
       Entries[I].MemMap.setMemoryPermission(Entries[I].CommitBase,
                                             Entries[I].CommitSize, 0);


        


More information about the llvm-commits mailing list