I try to use the boost::simple_segregated_storage, but I can`t understand how to use it correctly. There are no any samples. I use it in next way:
boost::simple_segregated_storage<int> pStorage;
const int num_partitions = 100;
const int partition_sz = sizeof(int);
const int block_sz = partition_sz * num_partitions;
int block[block_sz] = {};
pStorage.segregate(block, block_sz, partition_sz);
int* pInt = (int*)pStorage.malloc(); // <-- Crashes here
But I received crash. What I do wrong and where mistake? How to use it in right way?