[PATCH] D57306: [NFC] Move `AddressSpaceView` out of `Params` for Size class allocators.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 27 12:47:51 PST 2019
delcypher created this revision.
delcypher added reviewers: kcc, vitalybuka, dvyukov, cryptoad, eugenis, george.karpenkov, yln.
Herald added subscribers: Sanitizers, kubamracek.
Making `Params` a templated type and passing the `AddressSpaceView`
to the size class allocators was a design mistake. This patch instead
makes `AddressSpaceView` a separate template parameter and turns
`Params::ByteMap` into a templated alias `Params::ByteMapASVT`.
This gives us several wins.
- This change in design means it possible for the size class allocators can construct the type for their `RemoteAddressSpaceView` counter-part. Previously that was exceedingly difficult because the `Params` type the size class allocators received already had the `AddressSpaceView` type chosen.
- The `AP32` and `AP64` no longer need to be templated.
- `AP64` declarations go back to being simple.
- The type of SizeClassAllocator32::ByteMap is now correct by construction (i.e. `AP32` definitions can't pass in a ByteMap with the wrong `AddressSpaceView`).
The only downside to this patch is that it makes `AP32` declarations
more complicated.
rdar://problem/45284065
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D57306
Files:
lib/asan/asan_allocator.h
lib/lsan/lsan_allocator.h
lib/msan/msan_allocator.cc
lib/sanitizer_common/sanitizer_allocator_internal.h
lib/sanitizer_common/sanitizer_allocator_primary32.h
lib/sanitizer_common/sanitizer_allocator_primary64.h
lib/sanitizer_common/tests/sanitizer_allocator_test.cc
lib/scudo/scudo_allocator.h
lib/tsan/rtl/tsan_rtl.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57306.183768.patch
Type: text/x-patch
Size: 19825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190127/5907ca24/attachment.bin>
More information about the llvm-commits
mailing list