Boost.AFIO
v2.00 early alpha
|
Provides namespace utils. More...
Classes | |
class | boost::afio::v2_xxx::utils::page_allocator< T > |
An STL allocator which allocates large TLB page memory.If the operating system is configured to allow it, this type of memory is particularly efficient for doing large scale file i/o. This is because the kernel must normally convert the scatter gather buffers you pass into extended scatter gather buffers as the memory you see as contiguous may not, and probably isn't, actually be contiguous in physical memory. Regions returned by this allocator may be allocated contiguously in physical memory and therefore the kernel can pass through your scatter gather buffers unmodified. More... | |
struct | boost::afio::v2_xxx::utils::page_allocator< T >::rebind< U > |
class | boost::afio::v2_xxx::utils::page_allocator< void > |
struct | boost::afio::v2_xxx::utils::page_allocator< void >::rebind< U > |
Namespaces | |
namespace | boost |
The Boost namespace. | |
namespace | boost::afio |
The AFIO namespace. | |
namespace | boost::afio::v2_xxx |
Inline namespace for this version of AFIO. | |
namespace | boost::afio::v2_xxx::utils |
Utility routines often useful when using AFIO. | |
Functions | |
size_t | boost::afio::v2_xxx::utils::page_size () noexcept |
Returns the smallest page size of this architecture which is useful for calculating direct i/o multiples. More... | |
template<class T > | |
T | boost::afio::v2_xxx::utils::round_down_to_page_size (T i) noexcept |
Round a value to its next lowest page size multiple. | |
template<class T > | |
T | boost::afio::v2_xxx::utils::round_up_to_page_size (T i) noexcept |
Round a value to its next highest page size multiple. | |
template<class T > | |
std::pair< T *, size_t > | boost::afio::v2_xxx::utils::round_to_page_size (std::pair< T *, size_t > i) noexcept |
Round a pair of a pointer and a size_t to their nearest page size multiples. The pointer will be rounded down, the size_t upwards. | |
std::vector< size_t > | boost::afio::v2_xxx::utils::page_sizes (bool only_actually_available=true) |
Returns the page sizes of this architecture which is useful for calculating direct i/o multiples. More... | |
size_t | boost::afio::v2_xxx::utils::file_buffer_default_size () noexcept |
Returns a reasonable default size for page_allocator, typically the closest page size from page_sizes() to 1Mb. More... | |
void | boost::afio::v2_xxx::utils::random_fill (char *buffer, size_t bytes) |
Fills the buffer supplied with cryptographically strong randomness. Uses the OS kernel API. More... | |
std::string | boost::afio::v2_xxx::utils::random_string (size_t randomlen) |
Returns a cryptographically random string capable of being used as a filename. Essentially random_fill() + to_hex_string(). More... | |
large_page_allocation | boost::afio::v2_xxx::utils::detail::calculate_large_page_allocation (size_t bytes) |
large_page_allocation | boost::afio::v2_xxx::utils::detail::allocate_large_pages (size_t bytes) |
void | boost::afio::v2_xxx::utils::detail::deallocate_large_pages (void *p, size_t bytes) |
template<class T , class U > | |
bool | boost::afio::v2_xxx::utils::operator== (const page_allocator< T > &, const page_allocator< U > &) noexcept |
Provides namespace utils.