Apollo 10.0
自动驾驶开放平台
|
The memory pool for the data structure of BaseMapNode. 更多...
#include <base_map_pool.h>
Public 成员函数 | |
BaseMapNodePool (unsigned int pool_size, unsigned int thread_size) | |
Constructor | |
virtual | ~BaseMapNodePool () |
Destructor | |
void | Initial (const BaseMapConfig *map_config, bool is_fixed_size=true) |
Initialize the pool. | |
void | Release () |
Release the pool. | |
BaseMapNode * | AllocMapNode () |
Get a MapNode object from memory pool. | |
void | FreeMapNode (BaseMapNode *map_node) |
Release MapNode object to memory pool. | |
unsigned int | GetPoolSize () |
Get the size of pool. | |
Protected 属性 | |
bool | is_fixed_size_ |
The flag of pool auto expand. | |
std::list< BaseMapNode * > | free_list_ |
The list for free node. | |
std::set< BaseMapNode * > | busy_nodes_ |
The set for used node. | |
unsigned int | pool_size_ |
The size of memory pool. | |
std::future< void > | node_reset_workers_ |
The thread pool for release node. | |
boost::mutex | mutex_ |
The mutex for release thread. | |
const BaseMapConfig * | map_config_ |
The mutex for release thread. | |
The memory pool for the data structure of BaseMapNode.
在文件 base_map_pool.h 第 32 行定义.
apollo::localization::msf::BaseMapNodePool::BaseMapNodePool | ( | unsigned int | pool_size, |
unsigned int | thread_size | ||
) |
Constructor
<pool_size> | The memory pool size. |
<thread_size> | The thread pool size. |
在文件 base_map_pool.cc 第 28 行定义.
|
virtual |
Destructor
在文件 base_map_pool.cc 第 32 行定义.
BaseMapNode * apollo::localization::msf::BaseMapNodePool::AllocMapNode | ( | ) |
Get a MapNode object from memory pool.
<return> | The MapNode object. |
在文件 base_map_pool.cc 第 62 行定义.
void apollo::localization::msf::BaseMapNodePool::FreeMapNode | ( | BaseMapNode * | map_node | ) |
Release MapNode object to memory pool.
<map_node> | The released MapNode object. |
在文件 base_map_pool.cc 第 86 行定义.
|
inline |
void apollo::localization::msf::BaseMapNodePool::Initial | ( | const BaseMapConfig * | map_config, |
bool | is_fixed_size = true |
||
) |
Initialize the pool.
<map_config> | The map option. |
<is_fixed_size> | The flag of pool auto expand. |
在文件 base_map_pool.cc 第 34 行定义.
void apollo::localization::msf::BaseMapNodePool::Release | ( | ) |
Release the pool.
在文件 base_map_pool.cc 第 45 行定义.
|
protected |
The set for used node.
在文件 base_map_pool.h 第 81 行定义.
|
protected |
The list for free node.
在文件 base_map_pool.h 第 79 行定义.
|
protected |
The flag of pool auto expand.
在文件 base_map_pool.h 第 77 行定义.
|
protected |
The mutex for release thread.
在文件 base_map_pool.h 第 89 行定义.
|
protected |
The mutex for release thread.
在文件 base_map_pool.h 第 87 行定义.
|
protected |
The thread pool for release node.
在文件 base_map_pool.h 第 85 行定义.
|
protected |
The size of memory pool.
在文件 base_map_pool.h 第 83 行定义.