以下は、公式の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;
}