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