The memory pool for the data structure of BaseMapNode.
More...
#include <base_map_pool.h>
The memory pool for the data structure of BaseMapNode.
◆ BaseMapNodePool()
| apollo::localization::msf::BaseMapNodePool::BaseMapNodePool |
( |
unsigned int |
pool_size, |
|
|
unsigned int |
thread_size |
|
) |
| |
Constructor.
- Parameters
-
| <pool_size> | The memory pool size. |
| <thread_size> | The thread pool size. |
◆ ~BaseMapNodePool()
| virtual apollo::localization::msf::BaseMapNodePool::~BaseMapNodePool |
( |
| ) |
|
|
virtual |
◆ AllocMapNode()
| BaseMapNode* apollo::localization::msf::BaseMapNodePool::AllocMapNode |
( |
| ) |
|
Get a MapNode object from memory pool.
- Parameters
-
| <return> | The MapNode object. |
◆ FreeMapNode()
| void apollo::localization::msf::BaseMapNodePool::FreeMapNode |
( |
BaseMapNode * |
map_node | ) |
|
Release MapNode object to memory pool.
- Parameters
-
| <map_node> | The released MapNode object. |
◆ GetPoolSize()
| unsigned int apollo::localization::msf::BaseMapNodePool::GetPoolSize |
( |
| ) |
|
|
inline |
◆ Initial()
| void apollo::localization::msf::BaseMapNodePool::Initial |
( |
const BaseMapConfig * |
map_config, |
|
|
bool |
is_fixed_size = true |
|
) |
| |
Initialize the pool.
- Parameters
-
| <map_config> | The map option. |
| <is_fixed_size> | The flag of pool auto expand. |
◆ Release()
| void apollo::localization::msf::BaseMapNodePool::Release |
( |
| ) |
|
◆ busy_nodes_
| std::set<BaseMapNode*> apollo::localization::msf::BaseMapNodePool::busy_nodes_ |
|
protected |
◆ free_list_
| std::list<BaseMapNode*> apollo::localization::msf::BaseMapNodePool::free_list_ |
|
protected |
◆ is_fixed_size_
| bool apollo::localization::msf::BaseMapNodePool::is_fixed_size_ |
|
protected |
The flag of pool auto expand.
◆ map_config_
| const BaseMapConfig* apollo::localization::msf::BaseMapNodePool::map_config_ |
|
protected |
The mutex for release thread.
◆ mutex_
| boost::mutex apollo::localization::msf::BaseMapNodePool::mutex_ |
|
protected |
The mutex for release thread.
◆ node_reset_workers_
| std::future<void> apollo::localization::msf::BaseMapNodePool::node_reset_workers_ |
|
protected |
The thread pool for release node.
◆ pool_size_
| unsigned int apollo::localization::msf::BaseMapNodePool::pool_size_ |
|
protected |
The documentation for this class was generated from the following file: