Opened 7 years ago
Last modified 7 years ago
#11568 new Bugs
Memory mapping with Boost version 1.57
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi,
I am using Visual studio 2013 and boost library version 1.57.
I am using boost::interprocess namespace for mapping file's contents in memory.
I am using it in the following way:
m_fileMapper = new boost::interprocess::file_mapping((m_strInputFileName->getStringValue()).c_str(), boost::interprocess::read_only);
m_pixelRegion = new boost::interprocess::mapped_region(*m_fileMapper, boost::interprocess::read_only, m_FileHeader.PixelStartPos);
Here (m_strInputFileName->getStringValue()).c_str() will give the file which will be mapped to the memory.
m_FileHeader.PixelStartPos will give the position of the pixel in the file.
But when I execute this it throws an exception of type "boost::interprocess::interprocess_exception"
and the error code is 3, which is for "Access denied", even though the file is writable. This will happen when mapping the region.
It works correctly with Visual studio 2010 and boost version 1.48
Kindly let me know how to solve this problem.
Thanks & regards, Ravi Appaji