Skip to content

Commit 0893687

Browse files
author
Kostya Kortchinsky
committed
[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
1 parent 9213cbd commit 0893687

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/sanitizer_common/sanitizer_allocator_local_cache.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ struct SizeClassAllocator32LocalCache {
262262
// TODO(alekseys): Figure out how to do it without allocating a new batch.
263263
if (UNLIKELY(!b))
264264
DieOnFailure::OnOOM();
265-
b->SetFromArray(allocator->GetRegionBeginBySizeClass(class_id),
266-
&c->batch[first_idx_to_drain], count);
265+
b->SetFromArray(&c->batch[first_idx_to_drain], count);
267266
c->count -= count;
268267
allocator->DeallocateBatch(&stats_, class_id, b);
269268
}

lib/sanitizer_common/sanitizer_allocator_primary32.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SizeClassAllocator32 {
6363

6464
struct TransferBatch {
6565
static const uptr kMaxNumCached = SizeClassMap::kMaxNumCachedHint - 2;
66-
void SetFromArray(uptr region_beg_unused, void *batch[], uptr count) {
66+
void SetFromArray(void *batch[], uptr count) {
6767
count_ = count;
6868
CHECK_LE(count_, kMaxNumCached);
6969
for (uptr i = 0; i < count; i++)

0 commit comments

Comments
 (0)