|
pstore2
|
A class which is responsible for creating the memory-mapped regions used by the data store. More...
#include <region.hpp>
Public Types | |
| using | container_type = std::vector< pstore::region::memory_mapper_ptr > |
Public Member Functions | |
| region_builder (std::shared_ptr< File > file, std::uint64_t full_size, std::uint64_t minimum_size) noexcept | |
| region_builder (region_builder const &)=delete | |
| region_builder (region_builder &&) noexcept=delete | |
| region_builder & | operator= (region_builder const &)=delete |
| region_builder & | operator= (region_builder &&)=delete |
| auto | operator() (std::uint64_t bytes_to_map) -> container_type |
| void | append (gsl::not_null< container_type *> regions, std::uint64_t offset, std::uint64_t bytes_to_map) |
| Creates one of more additional memory-mapped regions covering the file starting at the position given by 'offset' and extending for 'bytes_to_map' bytes. More... | |
A class which is responsible for creating the memory-mapped regions used by the data store.
It is intended to decouple the creation of these object from the File and MemoryMapper classes.
It tries to create regions which are as large as possible (in multiple of the "minimum" size, but no larger than "full" size to avoid requesting too much contiguous address space.
|
noexcept |
| file | The file containing the data to be memory-mapped. |
| full_size | The number of bytes in a "full size" memory-mapped region. |
| minimum_size | The number of bytes in a "minimum size" memory-mapped region. |
| void pstore::region::region_builder< File, MemoryMapper >::append | ( | gsl::not_null< container_type *> | regions, |
| std::uint64_t | offset, | ||
| std::uint64_t | bytes_to_map | ||
| ) |
Creates one of more additional memory-mapped regions covering the file starting at the position given by 'offset' and extending for 'bytes_to_map' bytes.
| regions | An existing collection of memory-mapped regions that will be extended to contain the regions create to map the given file range. |
| offset | The first byte of the file to be mapped by additional memory-mapped regions. |
| bytes_to_map | The number of bytes in the file to be mapped by additional memory-mapped regions. |
| auto pstore::region::region_builder< File, MemoryMapper >::operator() | ( | std::uint64_t | bytes_to_map | ) | -> container_type |
| bytes_to_map | The number of bytes to be mapped. |
1.8.13