65 inline static std::tuple<void*, size_t>
create(
const std::string &name,
size_t size )
67 int fd = shm_open( name.c_str(), O_CREAT | O_RDWR, 0600 );
76 if(
fstat( fd, &statbuf ) < 0 )
78 size = statbuf.st_size;
79 void *mem = map_shm( fd, size );
81 return std::make_tuple( mem, size );
163 void *mem = mmap(
nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );