163
SocketFile::create_chunk(off_t offset, uint32_t length, int prot, int flags) const {
152
SocketFile::create_chunk(uint64_t offset, uint32_t length, int prot, int flags) const {
165
154
throw internal_error("SocketFile::get_chunk() called on a closed file");
171
156
// For some reason mapping beyond the extent of the file does not
172
157
// cause mmap to complain, so we need to check manually here.
173
158
if (offset < 0 || length == 0 || offset > size() || offset + length > size())
178
163
char* ptr = (char*)mmap(NULL, length + align, prot, flags, m_fd, offset - align);