diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-05-03 19:14:07 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-05-03 19:14:07 +0000 |
commit | 0893687d0eed9912c65f0bffc0bb0c69c867b4f8 (patch) | |
tree | 8178bc9c58a81c5c2fce1898a127021eb796967c /lib/sanitizer_common | |
parent | 9213cbd62580dfe10db7bf7412f08b585c8a85ec (diff) |
[sanitizer] Remove unused 32-bit allocator TransferBatch parameter
Summary:
NFC. Remove an unused parameter in
`SizeClassAllocator32::TransferBatch::SetFromArray`, and thus get rid of the
compilation warning.
Reviewers: alekseyshl, vitalybuka
Reviewed By: vitalybuka
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D46397
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common')
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator_local_cache.h | 3 | ||||
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator_primary32.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator_local_cache.h b/lib/sanitizer_common/sanitizer_allocator_local_cache.h index 731132620..5bfe83b9f 100644 --- a/lib/sanitizer_common/sanitizer_allocator_local_cache.h +++ b/lib/sanitizer_common/sanitizer_allocator_local_cache.h @@ -262,8 +262,7 @@ struct SizeClassAllocator32LocalCache { // TODO(alekseys): Figure out how to do it without allocating a new batch. if (UNLIKELY(!b)) DieOnFailure::OnOOM(); - b->SetFromArray(allocator->GetRegionBeginBySizeClass(class_id), - &c->batch[first_idx_to_drain], count); + b->SetFromArray(&c->batch[first_idx_to_drain], count); c->count -= count; allocator->DeallocateBatch(&stats_, class_id, b); } diff --git a/lib/sanitizer_common/sanitizer_allocator_primary32.h b/lib/sanitizer_common/sanitizer_allocator_primary32.h index 0fb94a12e..ca78cad35 100644 --- a/lib/sanitizer_common/sanitizer_allocator_primary32.h +++ b/lib/sanitizer_common/sanitizer_allocator_primary32.h @@ -63,7 +63,7 @@ class SizeClassAllocator32 { struct TransferBatch { static const uptr kMaxNumCached = SizeClassMap::kMaxNumCachedHint - 2; - void SetFromArray(uptr region_beg_unused, void *batch[], uptr count) { + void SetFromArray(void *batch[], uptr count) { count_ = count; CHECK_LE(count_, kMaxNumCached); for (uptr i = 0; i < count; i++) |