BioDynaMo
v1.05.120-25dc9790
|
#include <memory_manager.h>
Public Member Functions | |
List (uint64_t n) | |
List (const List &other) | |
Node * | PopFront () |
void | PushFront (Node *head) |
void | PushFrontThreadSafe (Node *head) |
void | PushBackN (Node *head, Node *tail) |
void | PushBackNThreadSafe (Node *head, Node *tail) |
void | PopBackN (Node **head, Node **tail) |
void | PopBackNThreadSafe (Node **head, Node **tail) |
bool | Empty () const |
bool | CanPopBackN () const |
uint64_t | Size () const |
uint64_t | GetN () const |
Private Attributes | |
Node * | head_ = nullptr |
Node * | tail_ = nullptr |
std::list< Node * > | skip_list_ |
uint64_t | size_ = 0 |
uint64_t | nodes_before_skip_list_ = 0 |
uint64_t | n_ |
Number of nodes for which fast migrations are supported. More... | |
Spinlock | lock_ |
List to store free memory regions.
Supports fast migration of N nodes to and from the list.
N has to be set when the object is constructed.
Fast migration is supported by maintaining a skip list.
Definition at line 40 of file memory_manager.h.
|
explicit |
n | n is the number of elements that can be added and removed very fast. |
Definition at line 28 of file memory_manager.cc.
bdm::memory_manager_detail::List::List | ( | const List & | other | ) |
Definition at line 30 of file memory_manager.cc.
bool bdm::memory_manager_detail::List::CanPopBackN | ( | ) | const |
Definition at line 129 of file memory_manager.cc.
bool bdm::memory_manager_detail::List::Empty | ( | ) | const |
Definition at line 127 of file memory_manager.cc.
uint64_t bdm::memory_manager_detail::List::GetN | ( | ) | const |
Definition at line 133 of file memory_manager.cc.
Definition at line 106 of file memory_manager.cc.
Definition at line 122 of file memory_manager.cc.
Node * bdm::memory_manager_detail::List::PopFront | ( | ) |
Definition at line 38 of file memory_manager.cc.
Definition at line 83 of file memory_manager.cc.
Definition at line 101 of file memory_manager.cc.
void bdm::memory_manager_detail::List::PushFront | ( | Node * | head | ) |
Definition at line 60 of file memory_manager.cc.
void bdm::memory_manager_detail::List::PushFrontThreadSafe | ( | Node * | head | ) |
Definition at line 78 of file memory_manager.cc.
uint64_t bdm::memory_manager_detail::List::Size | ( | ) | const |
Definition at line 131 of file memory_manager.cc.
|
private |
Definition at line 71 of file memory_manager.h.
|
private |
Definition at line 78 of file memory_manager.h.
|
private |
Number of nodes for which fast migrations are supported.
Definition at line 77 of file memory_manager.h.
|
private |
Definition at line 75 of file memory_manager.h.
|
private |
Definition at line 74 of file memory_manager.h.
|
private |
Definition at line 73 of file memory_manager.h.
|
private |
Definition at line 72 of file memory_manager.h.