
19 Jul
2004
19 Jul
'04
2:28 a.m.
Dear list,
I have tried many ways but could not figure out how to boost::serialize
the following object:
Basically, to maintain a big chunk of small objects, I use a memory pool
to allocate a big trunk of memory and return the pointers to small
objects.
struct small
{
int size;
int * ptr;
init(int s, int* p){ size = s; ptr = p; }
}
struct All
{
vector<int> data;
vector<small> objs;
All(int num_obj, int size_obj)
{
data.resize( num_obj * size_obj);
for(int i=0; i