diff options
author | 2013-11-07 06:19:47 +0000 | |
---|---|---|
committer | 2013-11-07 06:19:48 +0000 | |
commit | fc1824ea553a7339b2e3f3d7c7b4e8e87acb1844 (patch) | |
tree | 81a1e831be5b0f554a0b23f2b134cc73b5cf2525 | |
parent | 81dfcdcb737379fc4e569a2b8d40761be6431921 (diff) | |
parent | 75534b98ca7a0e792d078a61520ee69b74548429 (diff) | |
download | latinime-fc1824ea553a7339b2e3f3d7c7b4e8e87acb1844.tar.gz latinime-fc1824ea553a7339b2e3f3d7c7b4e8e87acb1844.tar.xz latinime-fc1824ea553a7339b2e3f3d7c7b4e8e87acb1844.zip |
Merge "Use sysconf(_SC_PAGESIZE) instead of getpagesize()."
-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; |