|
| | mem_based_factory (std::shared_ptr< file::in_memory > file, std::uint64_t full_size, std::uint64_t min_size) |
| |
| std::vector< memory_mapper_ptr > | init () override |
| | Creates the memory mapping objects for the given database file. More...
|
| |
|
void | add (gsl::not_null< std::vector< memory_mapper_ptr > *> regions, std::uint64_t original_size, std::uint64_t new_size) override |
| |
|
std::shared_ptr< file::file_base > | file () override |
| |
|
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) |
| |
◆ mem_based_factory()
| pstore::region::mem_based_factory::mem_based_factory |
( |
std::shared_ptr< file::in_memory > |
file, |
|
|
std::uint64_t |
full_size, |
|
|
std::uint64_t |
min_size |
|
) |
| |
|
explicit |
- Parameters
-
| file | An open file containing the data to be memory-mapped. |
| full_size | The size of the largest memory-mapped file region. |
| min_size | The size of the smallest memory-mapped file region. |
◆ init()
| auto pstore::region::mem_based_factory::init |
( |
| ) |
|
|
overridevirtual |
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.
Implements pstore::region::factory.
The documentation for this class was generated from the following files: