Skip to content

Commit

Permalink
[scudo][NFC] Remove unneeded template from scudo::CombinedAllocator
Browse files Browse the repository at this point in the history
Reviewers: cryptoad, eugenis

Reviewed By: cryptoad

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D61162

llvm-svn: 359718
  • Loading branch information
vitalybuka committed May 1, 2019
1 parent 18add16 commit 7780f51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions compiler-rt/lib/scudo/scudo_allocator.h
Expand Up @@ -100,11 +100,13 @@ typedef SizeClassAllocator32<AP32> PrimaryT;
#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();

Expand Down
3 changes: 2 additions & 1 deletion compiler-rt/lib/scudo/scudo_allocator_combined.h
Expand Up @@ -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);
Expand Down

0 comments on commit 7780f51

Please sign in to comment.