Rename TypeAlloc to Pool
Minor refactor to clarify purpose of the pool.
This commit is contained in:
21
src/mem/pooled.h
Normal file
21
src/mem/pooled.h
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user