all,
If you use boost pool library, how would you replace the following statement:
MyStruct *someStruct = (MyStruct *) calloc(numOfElements, sizeof(MyStruct));
If it was for one element, I would do:
boost::object_pool<MyStruct> myPool;
MyStruct *someStruct = myPool.malloc();
but since "numOfElements" is a variable, I have the feeling executing a loop of malloc() is not a good idea?