[compiler-rt] r359718 - [scudo][NFC] Remove unneeded template from scudo::CombinedAllocator
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 12:36:26 PDT 2019
Author: vitalybuka
Date: Wed May 1 12:36:26 2019
New Revision: 359718
URL: http://llvm.org/viewvc/llvm-project?rev=359718&view=rev
Log:
[scudo][NFC] Remove unneeded template from scudo::CombinedAllocator
Reviewers: cryptoad, eugenis
Reviewed By: cryptoad
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D61162
Modified:
compiler-rt/trunk/lib/scudo/scudo_allocator.h
compiler-rt/trunk/lib/scudo/scudo_allocator_combined.h
Modified: compiler-rt/trunk/lib/scudo/scudo_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_allocator.h?rev=359718&r1=359717&r2=359718&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_allocator.h (original)
+++ compiler-rt/trunk/lib/scudo/scudo_allocator.h Wed May 1 12:36:26 2019
@@ -100,11 +100,13 @@ typedef SizeClassAllocator32<AP32> Prima
#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();
Modified: compiler-rt/trunk/lib/scudo/scudo_allocator_combined.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_allocator_combined.h?rev=359718&r1=359717&r2=359718&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_allocator_combined.h (original)
+++ compiler-rt/trunk/lib/scudo/scudo_allocator_combined.h Wed May 1 12:36:26 2019
@@ -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);
More information about the llvm-commits
mailing list