25 #ifndef TERVEL_MEMORY_RC_POOL_MANAGER_H_
26 #define TERVEL_MEMORY_RC_POOL_MANAGER_H_
131 "Managed pools have to be cache aligned to prevent false sharing.");
133 std::unique_ptr<ManagedPool[]>
pools_;
143 #endif // TERVEL_MEMORY_RC_POOL_MANAGER_H_
A manager class for the reference count protected memory pools.
Definition: pool_manager.h:54
std::unique_ptr< ManagedPool[]> pools_
Definition: pool_manager.h:131
std::atomic< PoolElement * > unsafe_pool
Definition: pool_manager.h:126
void add_unsafe_elements(uint64_t pid, PoolElement *pool)
Places unsafe elements into the global pool.
TODO(steven):
Definition: mcas.h:36
std::atomic< PoolElement * > safe_pool
Definition: pool_manager.h:125
DISALLOW_COPY_AND_ASSIGN(PoolManager)
void add_safe_elements(uint64_t pid, PoolElement *pool, PoolElement *pool_end=nullptr)
Places excess elements into the global pool.
#define CACHE_LINE_SIZE
Definition: system.h:41
void get_safe_elements(PoolElement **pool, uint64_t *count, uint64_t min_elem)
This fuinction attempts to get 'count' many elements from the global pool.
This class is used to hold the memory management information (Header) and a descriptor object...
Definition: pool_element.h:46
char padding[CACHE_LINE_SIZE-sizeof(safe_pool)-sizeof(unsafe_pool)]
Definition: pool_manager.h:128
Definition: pool_manager.h:124
DescriptorPool * allocate_pool(const uint64_t tid)
Allocates a pool for thread-local use.
Defines a pool of descriptor objects which is used to allocate descriptors and to store them while th...
Definition: descriptor_pool.h:57
const size_t number_pools_
Definition: pool_manager.h:121
PoolManager(size_t number_pools)
PoolManager constructor.
Definition: pool_manager.h:64