Add files via upload

This commit is contained in:
YuqqiZhou 2019-02-22 21:50:01 +08:00 committed by GitHub
parent d2732ee989
commit 8e16c03b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -85,10 +85,10 @@ class StringIndexFile
struct stat statbuf;
int fd;
stat((this->get_loc() + "value").c_str(), &statbuf);
//fd = open((this->get_loc() + "value").c_str(), O_RDONLY);
fd = open((this->get_loc() + "value").c_str(), O_RDONLY);
this->mmapLength = (statbuf.st_size / 4096 + 1) * 4096;
this->Mmap = (char*)mmap(NULL, this->mmapLength, PROT_READ, MAP_POPULATE | MAP_SHARED, fd, 0);
//close(fd);
close(fd);
}
void set_string_base(string *_base)