BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
libraries
fc
src
interprocess
file_mapping.cpp
Go to the documentation of this file.
1
#include <
fc/interprocess/file_mapping.hpp
>
2
#include <boost/interprocess/file_mapping.hpp>
3
#include <boost/interprocess/mapped_region.hpp>
4
#include <
fc/fwd_impl.hpp
>
5
6
namespace
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
13
file_mapping::~file_mapping
() {}
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
21
mapped_region::mapped_region
(
const
file_mapping
& fm,
mode_t
m ) :
22
my( *fm.my, m ==
read_only
? boost::interprocess::
read_only
: boost::interprocess::
read_write
)
23
{}
24
25
mapped_region::~mapped_region
(){}
26
27
void
*
mapped_region::get_address
()
const
28
{
29
return
my->get_address();
30
}
31
32
void
mapped_region::flush
()
33
{
34
my->flush();
35
}
36
37
size_t
mapped_region::get_size
()
const
38
{
39
return
my->get_size();
40
}
41
}
fc::read_write
@ read_write
Definition:
file_mapping.hpp:16
fc
Definition:
api.hpp:15
file_mapping.hpp
fc::file_mapping::~file_mapping
~file_mapping()
Definition:
file_mapping.cpp:13
fc::read_only
@ read_only
Definition:
file_mapping.hpp:14
fc::file_mapping::file_mapping
file_mapping(const char *file, mode_t)
Definition:
file_mapping.cpp:9
fc::mapped_region::mapped_region
mapped_region(const file_mapping &fm, mode_t m, uint64_t start, size_t size)
Definition:
file_mapping.cpp:17
fc::mode_t
mode_t
Definition:
file_mapping.hpp:13
fc::mapped_region::flush
void flush()
Definition:
file_mapping.cpp:32
fc::mapped_region::~mapped_region
~mapped_region()
Definition:
file_mapping.cpp:25
fc::mapped_region::get_size
size_t get_size() const
Definition:
file_mapping.cpp:37
fc::file_mapping
Definition:
file_mapping.hpp:19
fc::mapped_region::get_address
void * get_address() const
Definition:
file_mapping.cpp:27
fwd_impl.hpp
Generated on Fri Dec 15 2023 06:12:43 for BitShares-Core by
1.8.17