|
| virtual std::vector< memory_mapper_ptr > | init ()=0 |
| | Creates the memory mapping objects for the given database file. More...
|
| |
|
virtual void | add (gsl::not_null< std::vector< memory_mapper_ptr > *> regions, std::uint64_t original_size, std::uint64_t new_size)=0 |
| |
|
virtual std::shared_ptr< file::file_base > | file ()=0 |
| |
|
std::uint64_t | full_size () const noexcept |
| |
|
std::uint64_t | min_size () const noexcept |
| |
|
| constexpr | factory (std::uint64_t const full_size, std::uint64_t const min_size) noexcept |
| |
|
template<typename File , typename MemoryMapper > |
| auto | create (std::shared_ptr< File > file) -> std::vector< memory_mapper_ptr > |
| |
|
template<typename File , typename MemoryMapper > |
| void | append (std::shared_ptr< File > file, gsl::not_null< std::vector< memory_mapper_ptr > *> regions, std::uint64_t original_size, std::uint64_t new_size) |
| |
◆ factory()
| constexpr pstore::region::factory::factory |
( |
std::uint64_t const |
full_size, |
|
|
std::uint64_t const |
min_size |
|
) |
| |
|
inlineprotectednoexcept |
- Note
- full_size modulo minimum_size must be 0.
- Parameters
-
| full_size | The size of the largest memory-mapped file region. |
| min_size | The size of the smallest memory-mapped file region. |
◆ init()
| virtual std::vector<memory_mapper_ptr> pstore::region::factory::init |
( |
| ) |
|
|
pure virtual |
Creates the memory mapping objects for the given database file.
Memory map the file regions. Creates an array of memory-mapped regions. This will consist of a number of entries whose size is equal to full_region_size followed by a number of entries of min_size bytes each up to the size of the file. A file whose size is not an exact multiple of min_size will have a single mapped region which extends beyond the (original) end of the file.
- Returns
- A container of memory mapper objects.
Implemented in pstore::region::mem_based_factory, and pstore::region::file_based_factory.
The documentation for this class was generated from the following files: