
On 9/6/07, 蹬三轮的
According to the description of pool, it should be working like you said. But actually it is not the same. Hereby, there are two cases provided. I think you will find two totally different results between them.
Okay, I have found the problem. pool::alloc_size seems to be a least
common multiple of sizeof(void*) and your chunk size.
Assuming sizeof(void*) is 4,
In the case of 1316, this comes to 1316. In the case of 1317, this
comes to 5268, or 4 times the requested size which is what you are
seeing. This seems incorrect.
I have not tested this, but on line 183 of boost/pool/pool.hpp, change
return details::pool::lcm