Skip to content
Snippets Groups Projects
Commit 75534b98 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Use sysconf(_SC_PAGESIZE) instead of getpagesize().

Bug: 11563061
Change-Id: I1350f0b1cb8e2bf17cdce34b7429763bbb6b2856
parent acf515ee
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ namespace latinime { ...@@ -35,7 +35,7 @@ namespace latinime {
AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno); AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno);
return MmappedBufferPtr(0); return MmappedBufferPtr(0);
} }
const int pagesize = getpagesize(); const int pagesize = sysconf(_SC_PAGESIZE);
const int offset = bufferOffset % pagesize; const int offset = bufferOffset % pagesize;
int alignedOffset = bufferOffset - offset; int alignedOffset = bufferOffset - offset;
int alignedSize = bufferSize + offset; int alignedSize = bufferSize + offset;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment