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

21
src/mem/pooled.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#include "../ds/bits.h"
namespace snmalloc
{
template<class T>
class Pooled
{
private:
template<class TT, class MemoryProvider>
friend class Pool;
template<class TT, Construction c>
friend class MPMCStack;
/// Used by the pool for chaining together entries when not in use.
std::atomic<T*> next = nullptr;
/// Used by the pool to keep the list of all entries ever created.
T* list_next;
};
}