From 8e16c03b6ca74ebe2efe492a8d7a3e7414ebb1d9 Mon Sep 17 00:00:00 2001 From: YuqqiZhou <41812724+YuqqiZhou@users.noreply.github.com> Date: Fri, 22 Feb 2019 21:50:01 +0800 Subject: [PATCH] Add files via upload --- StringIndex/StringIndex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StringIndex/StringIndex.h b/StringIndex/StringIndex.h index 3a81477..2767314 100644 --- a/StringIndex/StringIndex.h +++ b/StringIndex/StringIndex.h @@ -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)