On Mon, May 13, 2013 at 11:05 AM, Oodini
I'd like to share a vector of vectors (jagged 2D array). The data come from a deserialization. I know the size of the "external" vector. The sizes of the "internal" vectors are discovered during deserialization. Even with a simple vector, and if the number and the types of the elements are know? i woldn't know what size to set for truncation. On VS 2010, a sizeof(vector<int>) is 40; I suppose I have to add it sizeof(int)*nbElements to get the full size.
3. I don't know how to generalize that to a vector of vectors in order what should be the truncation size.
Who serializes the vector of vectors? Where were they created? Would they have been Boost.Interprocess vectors in that original process? If so, is there a way to determine the memory consumption in the *original* instance, and serialize that total size requirement before serializing the vector of vectors?