I wanted to try out TBB\'s scalable_allocator, but was confused when I had to replace some of my code. This is how allocation is done with the allocator:
Som
Use placement new
#include //... int main() { S* s = (S*) malloc(sizeof(S)); s = new (s) S();//placement new //... s->~S(); free(s); }