Skip to content

Commit

Permalink
[NFCI][scudo] Remove unused variable 'MaxCount' (llvm#100201)
Browse files Browse the repository at this point in the history
Fixes "error: unused variable 'MaxCount' [-Werror,-Wunused-variable]",
which is no longer used after
llvm#99409
  • Loading branch information
thurstond committed Jul 23, 2024
1 parent cbd5ba2 commit ce811fb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compiler-rt/lib/scudo/standalone/secondary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ce811fb

Please sign in to comment.