22 #include <boost/thread.hpp> 28 namespace localization {
void Release()
Release the pool.
bool is_fixed_size_
The flag of pool auto expand.
Definition: base_map_pool.h:77
unsigned int GetPoolSize()
Get the size of pool.
Definition: base_map_pool.h:57
The options of the reflectance map.
Definition: base_map_config.h:32
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void FreeMapNode(BaseMapNode *map_node)
Release MapNode object to memory pool.
virtual ~BaseMapNodePool()
Destructor.
unsigned int pool_size_
The size of memory pool.
Definition: base_map_pool.h:83
The memory pool for the data structure of BaseMapNode.
Definition: base_map_pool.h:32
std::future< void > node_reset_workers_
The thread pool for release node.
Definition: base_map_pool.h:85
const BaseMapConfig * map_config_
The mutex for release thread.
Definition: base_map_pool.h:89
BaseMapNode * AllocMapNode()
Get a MapNode object from memory pool.
void Initial(const BaseMapConfig *map_config, bool is_fixed_size=true)
Initialize the pool.
std::set< BaseMapNode * > busy_nodes_
The set for used node.
Definition: base_map_pool.h:81
boost::mutex mutex_
The mutex for release thread.
Definition: base_map_pool.h:87
std::list< BaseMapNode * > free_list_
The list for free node.
Definition: base_map_pool.h:79
The data structure of a Node in the map.
Definition: base_map_node.h:32
BaseMapNodePool(unsigned int pool_size, unsigned int thread_size)
Constructor.