diff options
author | Kostya Serebryany <kcc@google.com> | 2016-07-21 18:47:53 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-07-21 18:47:53 +0000 |
commit | 52ee88fd9cb9eaadfb9e8a6b460b57c2e25cb95d (patch) | |
tree | 53b75f77cfbcb754824b1bee3cc01a0934d72be1 /lib/sanitizer_common/sanitizer_allocator_primary32.h | |
parent | c8da6db25e5e82ea0ce79615cdffdc4966e2900f (diff) |
[sanitizer] allocator: remove kPopulateSize and only use SizeClassMap::MaxCached; ensure that TransferBatch size is a power of two, refactor TransferBatch creation/destruction into separate functions.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_allocator_primary32.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator_primary32.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator_primary32.h b/lib/sanitizer_common/sanitizer_allocator_primary32.h index 7d4d027a7..4b4574c1e 100644 --- a/lib/sanitizer_common/sanitizer_allocator_primary32.h +++ b/lib/sanitizer_common/sanitizer_allocator_primary32.h @@ -231,10 +231,7 @@ class SizeClassAllocator32 { Batch *b = nullptr; for (uptr i = reg; i < reg + n_chunks * size; i += size) { if (!b) { - if (SizeClassMap::SizeClassRequiresSeparateTransferBatch(class_id)) - b = (Batch*)c->Allocate(this, SizeClassMap::ClassID(sizeof(Batch))); - else - b = (Batch*)i; + b = c->CreateBatch(class_id, this, (Batch*)i); b->count = 0; } b->batch[b->count++] = (void*)i; |