[PATCH] D61162: [scudo] NFC: Remove unneeded template from scudo::CombinedAllocator
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 16:43:07 PDT 2019
vitalybuka created this revision.
vitalybuka added reviewers: cryptoad, eugenis.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61162
Files:
compiler-rt/lib/scudo/scudo_allocator.h
compiler-rt/lib/scudo/scudo_allocator_combined.h
Index: compiler-rt/lib/scudo/scudo_allocator_combined.h
===================================================================
--- compiler-rt/lib/scudo/scudo_allocator_combined.h
+++ compiler-rt/lib/scudo/scudo_allocator_combined.h
@@ -18,9 +18,10 @@
# error "This file must be included inside scudo_allocator.h."
#endif
-template <class PrimaryAllocator, class SecondaryAllocator>
class CombinedAllocator {
public:
+ using PrimaryAllocator = PrimaryT;
+ using SecondaryAllocator = SecondaryT;
using AllocatorCache = typename PrimaryAllocator::AllocatorCache;
void init(s32 ReleaseToOSIntervalMs) {
Primary.Init(ReleaseToOSIntervalMs);
Index: compiler-rt/lib/scudo/scudo_allocator.h
===================================================================
--- compiler-rt/lib/scudo/scudo_allocator.h
+++ compiler-rt/lib/scudo/scudo_allocator.h
@@ -107,11 +107,13 @@
#endif // SANITIZER_CAN_USE_ALLOCATOR64
#include "scudo_allocator_secondary.h"
-#include "scudo_allocator_combined.h"
typedef LargeMmapAllocator SecondaryT;
-typedef CombinedAllocator<PrimaryT, SecondaryT> BackendT;
-typedef BackendT::AllocatorCache AllocatorCacheT;
+
+#include "scudo_allocator_combined.h"
+
+typedef CombinedAllocator BackendT;
+typedef CombinedAllocator::AllocatorCache AllocatorCacheT;
void initScudo();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61162.196758.patch
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190425/94dacba6/attachment.bin>
More information about the llvm-commits
mailing list