7 #ifndef __STDC_FORMAT_MACROS
9 #define __STDC_FORMAT_MACROS
12 #include "cvmfs_config.h"
27 #ifdef CVMFS_NAMESPACE_GUARD
28 namespace CVMFS_NAMESPACE_GUARD {
33 file_path_(file_path),
50 if ((fd = open(
file_path_.c_str(), O_RDONLY, 0)) == -1) {
68 if (filesize.st_size > 0) {
70 mapping = mmap(NULL, filesize.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
71 if (mapping == MAP_FAILED) {
103 const bool munmap_failed =
false;
115 #ifdef CVMFS_NAMESPACE_GUARD
MemoryMappedFile(const std::string &file_path)
unsigned char * mapped_file_
assert((mem||(size==0))&&"Out Of Memory")
const std::string file_path_
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)