【发布时间】:2010-07-29 18:07:58
【问题描述】:
以下内容来自官方 BOOST 文档。
为什么我在调用 region.get_size() 时总是得到零大小?我做错了什么?
int main(int argc, char *argv[])
{
//Create a native windows shared memory object.
windows_shared_memory shm (create_only, "MySharedMemory", read_write, 1000);
//Map the whole shared memory in this process
mapped_region region(shm, read_write);
cout << "SIZE IS " << region.get_size() << endl;
return 0;
}
【问题讨论】:
标签: c++ boost boost-interprocess