Boost.AFIO    Boost C++ Libraries
Classes | Functions
boost::afio::utils Namespace Reference

Utility routines often useful when using AFIO. More...

Classes

class  secded_ecc
 Calculates the single error correcting double error detecting (SECDED) Hamming Error Correcting Code for a blocksize block of bytes. For example, a secdec_ecc<8> would be the very common 72,64 Hamming code used in ECC RAM, or secdec_ecc<4096> would be for a 32784,32768 Hamming code. More...
class  page_allocator
 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...
class  page_allocator< void >

Functions

BOOST_AFIO_DECL std::vector
< size_t > 
page_sizes (bool only_actually_available=true) noexcept
 Returns the page sizes of this architecture which is useful for calculating direct i/o multiples.
size_t file_buffer_default_size () noexcept
 Returns a reasonable default size for page_allocator, typically the closest page size from page_sizes() to 1Mb.
BOOST_AFIO_DECL void random_fill (char *buffer, size_t bytes)
 Fills the buffer supplied with cryptographically strong randomness. Uses the OS kernel API.
size_t to_hex_string (char *out, size_t outlen, const char *_in, size_t inlen)
 Converts a number to a hex string. Out buffer can be same as in buffer.
std::string to_hex_string (std::string in)
size_t from_hex_string (char *out, size_t outlen, const char *in, size_t inlen)
 Converts a hex string to a number. Out buffer can be same as in buffer.
std::string random_string (size_t randomlen)
 Returns a cryptographically random string capable of being used as a filename. Essentially random_fill() + to_hex_string().
template<class T , class U >
bool operator== (const page_allocator< T > &, const page_allocator< U > &) noexcept

Detailed Description

Utility routines often useful when using AFIO.


Function Documentation

std::string boost::afio::utils::to_hex_string ( std::string  in)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 5832 of file afio.hpp.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen