am fc1824ea: Merge "Use sysconf(_SC_PAGESIZE) instead of getpagesize()."

* commit 'fc1824ea553a7339b2e3f3d7c7b4e8e87acb1844':
  Use sysconf(_SC_PAGESIZE) instead of getpagesize().
main
Keisuke Kuroyanagi 2013-11-06 22:21:49 -08:00 committed by Android Git Automerger
commit 6da4c40019
1 changed files with 1 additions and 1 deletions

View File

@ -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;