46 #if 0 // experimental version using mmap after opening the file as read only. 71 m_size = stat.st_size;
72 m_map = mmap(NULL,m_size,PROT_READ,MAP_SHARED,m_fd,0);
73 if (m_map==MAP_FAILED) perror(
"mmap failed");
74 assert(m_map!=MAP_FAILED);
92 memcpy(buf,((
char *)m_map)+m_off,size);
116 munmap(m_map,m_size);
void setName(const char *name)
Abstract interface for file based memory storage operations.
Store implementation based on a file. Writing is linear, after that the file is re-opened for reading...
int readBlock(char *data, uint len)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
int read(char *buf, uint size)
void setName(const QString &name)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
int writeBlock(const char *data, uint len)
const char * data() const
FileStorage(const QString &name)
The QFile class is an I/O device that operates on files.
int write(const char *buf, uint size)