diff options
author | 2013-11-07 14:53:20 +0900 | |
---|---|---|
committer | 2013-11-07 14:53:20 +0900 | |
commit | 75534b98ca7a0e792d078a61520ee69b74548429 (patch) | |
tree | 3fba7f76602223e8592fa46e1280eb6c80a302f7 | |
parent | acf515ee6a9f3f9be8a44d3de3b118fc61dc5a7b (diff) | |
download | latinime-75534b98ca7a0e792d078a61520ee69b74548429.tar.gz latinime-75534b98ca7a0e792d078a61520ee69b74548429.tar.xz latinime-75534b98ca7a0e792d078a61520ee69b74548429.zip |
Use sysconf(_SC_PAGESIZE) instead of getpagesize().
Bug: 11563061
Change-Id: I1350f0b1cb8e2bf17cdce34b7429763bbb6b2856
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp index 28af97351..e88d6e0a9 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp @@ -35,7 +35,7 @@ namespace latinime { AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno); return MmappedBufferPtr(0); } - const int pagesize = getpagesize(); + const int pagesize = sysconf(_SC_PAGESIZE); const int offset = bufferOffset % pagesize; int alignedOffset = bufferOffset - offset; int alignedSize = bufferSize + offset; |