summaryrefslogtreecommitdiff
path: root/boost/interprocess/anonymous_shared_memory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/anonymous_shared_memory.hpp')
-rw-r--r--boost/interprocess/anonymous_shared_memory.hpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/boost/interprocess/anonymous_shared_memory.hpp b/boost/interprocess/anonymous_shared_memory.hpp
index 7184306a6d..624f57f9c3 100644
--- a/boost/interprocess/anonymous_shared_memory.hpp
+++ b/boost/interprocess/anonymous_shared_memory.hpp
@@ -20,7 +20,7 @@
#include <cstddef>
#if (!defined(BOOST_INTERPROCESS_WINDOWS))
-# include <fcntl.h> //open, O_CREAT, O_*...
+# include <fcntl.h> //open, O_CREAT, O_*...
# include <sys/mman.h> //mmap
# include <sys/stat.h> //mode_t, S_IRWXG, S_IRWXO, S_IRWXU,
#else
@@ -43,12 +43,10 @@ namespace ipcdetail{
{
public:
static mapped_region
- create_posix_mapped_region(void *address, offset_t offset, std::size_t size)
+ create_posix_mapped_region(void *address, std::size_t size)
{
mapped_region region;
region.m_base = address;
- region.m_offset = offset;
- region.m_extra_offset = 0;
region.m_size = size;
return region;
}
@@ -92,16 +90,16 @@ anonymous_shared_memory(std::size_t size, void *address = 0)
, 0);
if(address == MAP_FAILED){
- if(fd != -1)
+ if(fd != -1)
close(fd);
error_info err = system_error_code();
throw interprocess_exception(err);
}
- if(fd != -1)
+ if(fd != -1)
close(fd);
- return ipcdetail::raw_mapped_region_creator::create_posix_mapped_region(address, 0, size);
+ return ipcdetail::raw_mapped_region_creator::create_posix_mapped_region(address, size);
}
#else
{