Rename TypeAlloc to Pool

Minor refactor to clarify purpose of the pool.
This commit is contained in:
Matthew Parkinson
2019-01-18 09:53:14 +00:00
parent 4748f25e57
commit 806f7e47cc
4 changed files with 32 additions and 20 deletions

View File

@@ -2,15 +2,15 @@
#include "../ds/helpers.h"
#include "alloc.h"
#include "typealloc.h"
#include "pool.h"
namespace snmalloc
{
template<class MemoryProvider>
class AllocPool : TypeAlloc<Allocator<MemoryProvider>, MemoryProvider>
class AllocPool : Pool<Allocator<MemoryProvider>, MemoryProvider>
{
using Alloc = Allocator<MemoryProvider>;
using Parent = TypeAlloc<Allocator<MemoryProvider>, MemoryProvider>;
using Parent = Pool<Allocator<MemoryProvider>, MemoryProvider>;
public:
static AllocPool* make(MemoryProvider& mp)
@@ -29,12 +29,12 @@ namespace snmalloc
Alloc* acquire()
{
return Parent::alloc(Parent::memory_provider);
return Parent::acquire(Parent::memory_provider);
}
void release(Alloc* a)
{
Parent::dealloc(a);
Parent::release(a);
}
public: