메타프로그래밍/Boost::

c+11 과 boost 메모리풀 연동

3DMP 2015. 3. 19. 16:53

BLOG main image






#include <list>

#include <hash_set>

#include <hash_map>


#include <boost/pool/object_pool.hpp>

#include <boost/pool/pool_alloc.hpp>



struct nodeInfo{


};




typedef stdext::hash_map<int, nodeInfo , stdext::hash_compare<int> , boost::fast_pool_allocator<int, boost::default_user_allocator_new_delete, boost::details::pool::null_mutex> > hashMapPoolNode;



typedef stdext::hash_set<int, stdext::hash_compare<int> , boost::fast_pool_allocator<int, boost::default_user_allocator_new_delete, boost::details::pool::null_mutex> > hashsetPoolNode;



typedef std::list<int, boost::fast_pool_allocator<int, boost::default_user_allocator_new_delete, boost::details::pool::null_mutex> > listPoolNode;





반응형