BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_MEMORY_MEMORY_MANAGER_H_
16 #define CORE_MEMORY_MEMORY_MANAGER_H_
30 namespace memory_manager_detail {
44 explicit List(uint64_t n);
66 uint64_t
Size()
const;
68 uint64_t
GetN()
const;
96 static uint64_t
RoundUpTo(uint64_t number, uint64_t multiple);
99 real_t growth_rate, uint64_t max_mem_per_thread_factor);
132 uint64_t max_mem_per_thread_factor);
139 void*
New(std::size_t size);
152 uint64_t max_mem_per_thread_factor);
156 void*
New(std::size_t size);
181 #endif // CORE_MEMORY_MEMORY_MANAGER_H_
Pool allocator for a specific allocation size and numa node. .
static constexpr uint64_t kMetadataSize
char * initialized_until_
Memory to the left has been initialized.
uint64_t nodes_before_skip_list_
void PushBackN(Node *head, Node *tail)
std::vector< NumaPoolAllocator * > numa_allocators_
PoolAllocator(std::size_t size, uint64_t size_n_pages, real_t growth_rate, uint64_t max_mem_per_thread_factor)
void SetIgnoreDelete(bool value)
void * New(std::size_t size)
uint64_t max_nodes_per_thread_
std::vector< AllocatedBlock > memory_blocks_
uint64_t aligned_pages_shift_
std::vector< List > free_lists_
void PopBackN(Node **head, Node **tail)
static uint64_t RoundUpTo(uint64_t number, uint64_t multiple)
UnorderedFlatmap< std::size_t, memory_manager_detail::PoolAllocator * > allocators_
Contains metadata for an allocated memory block.
std::list< Node * > skip_list_
uint64_t n_
Number of nodes for which fast migrations are supported.
void AllocNewMemoryBlock(std::size_t size)
uint64_t max_mem_per_thread_factor_
void PopBackNThreadSafe(Node **head, Node **tail)
void PushFront(Node *head)
uint64_t num_elements_per_n_pages_
void GetNextPageBatch(uint64_t size_n_pages, char **start, uint64_t *size)
void PushBackNThreadSafe(Node *head, Node *tail)
void * New(std::size_t size)
void InitializeNPages(List *tl_list, char *block, uint64_t mem_block_size)
bool IsFullyInitialized() const
This class stores information about each thread. (e.g. to which NUMA node it belongs to....
NumaPoolAllocator(uint64_t size, int nid, uint64_t size_n_pages, real_t growth_rate, uint64_t max_mem_per_thread_factor)
MemoryManager(uint64_t aligned_pages_shift, real_t growth_rate, uint64_t max_mem_per_thread_factor)
void PushFrontThreadSafe(Node *head)