what's the difference between boost::pool<>::malloc and boost::pool<>::ordered_malloc, and when should I use boost::pool<>::ordered_malloc?
问题 I'm using boost.pool, but I don't know when to use boost::pool<>::malloc and boost::pool<>::ordered_malloc ? so, what's the difference of boost::pool<>::malloc and boost::pool<>::ordered_malloc ? when should I use boost::pool<>::ordered_malloc ? 回答1: First, we should know the basic idea behind the Boost Pool library: simple_segregated_storage , it is similar to a singly linked list, and responsible for partitioning a memory block into fixed-size chunks: A memory pool keeps a free list of