Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
file_mapping.cpp
Go to the documentation of this file.
2#include <boost/interprocess/file_mapping.hpp>
3#include <boost/interprocess/mapped_region.hpp>
4#include <fc/fwd_impl.hpp>
5
6namespace fc {
7
8
9 file_mapping::file_mapping( const char* file, mode_t m ) :
10 my(file, m == read_only ? boost::interprocess::read_only : boost::interprocess::read_write )
11 {}
12
14
15
16
17 mapped_region::mapped_region( const file_mapping& fm, mode_t m, uint64_t start, size_t size ) :
18 my( *fm.my, m == read_only ? boost::interprocess::read_only : boost::interprocess::read_write ,start, size)
19 {}
20
22 my( *fm.my, m == read_only ? boost::interprocess::read_only : boost::interprocess::read_write)
23 {}
24
26
28 {
29 return my->get_address();
30 }
31
33 {
34 my->flush();
35 }
36
38 {
39 return my->get_size();
40 }
41}
file_mapping(const char *file, mode_t)
mapped_region(const file_mapping &fm, mode_t m, uint64_t start, size_t size)
size_t get_size() const
void * get_address() const
namespace sysio::chain
Definition authority.cpp:3
@ read_write
@ read_only
unsigned __int64 uint64_t
Definition stdint.h:136