30 Jul
2009
30 Jul
'09
12:34 a.m.
samuel.gallard escribió:
Hello,
I first present to you my code and I will explain my problem with the code .
First of all, you can't use virtual functions in shared memory, this is explained in the documentation "Limitations When Constructing Objects In Mapped Regions" http://www.boost.org/doc/libs/1_39_0/doc/html/interprocess/sharedmemorybetwe... the 10 limit is probably because string has an internal buffer before dynamically allocating anything (an optimization known as Small String Optimization). Everytying is write until you try to allocate memory See "doc_cont.cpp" example to see how containers (and strings) are placed in shared memory. Best, Ion