Boost logo

Boost Users :

Subject: Re: [Boost-users] Interprocess windows_shared_memory 1.35
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-03-06 11:02:25


Joy Vincent wrote:
> I am attempting to create a windows_shared_memory object for a large
> file that exists using Boost 1.35. I have attempted to create it 2 ways:
>
> interprocess::windows_shared_memory *wsm = new
> interprocess::windows_shared_memory(interprocess::open_or_create,
> fileName.c_str(), interprocess::read_only,fileSize);

Windows shared memory creates a shared memory not a file.
windows_shared_memory is backed by the windows swap file not any
arbitrary filesystem path. If you want to map a file use file_mapping +
  mapped region.

Regards,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net