18 #ifndef FST_MAPPED_FILE_H_ 19 #define FST_MAPPED_FILE_H_ 57 const void *
data()
const {
return region_.data; }
65 const std::string &source,
72 static MappedFile * MapFromFileDescriptor(
int fd,
size_t pos,
79 static MappedFile *Allocate(
size_t size,
size_t align = kArchAlignment);
87 return Allocate(
sizeof(T) * count,
alignof(T));
100 static constexpr
size_t kArchAlignment = 16;
102 static constexpr
size_t kMaxReadChunk = 256 * 1024 * 1024;
113 #endif // FST_MAPPED_FILE_H_
void * mutable_data() const
void Map(FarReader< Arc > &reader, FarWriter< Arc > &writer, Functor functor)
static MappedFile * AllocateType(size_t count)
const void * data() const