diff options
author | Eric Milkie <milkie@10gen.com> | 2012-05-31 09:10:02 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-06-01 10:12:54 -0400 |
commit | 25ee6dfdc9e52ab93e664d166352d6787af6a4e3 (patch) | |
tree | 35888dbe1a5b10d4d575d991b2252b949f58184c /src/mongo/util/mmap_posix.cpp | |
parent | 8957d3849edc9a94ab6057ce51ff3830c9522073 (diff) | |
download | mongo-25ee6dfdc9e52ab93e664d166352d6787af6a4e3.tar.gz |
startuptest for pagesize constant
Diffstat (limited to 'src/mongo/util/mmap_posix.cpp')
-rw-r--r-- | src/mongo/util/mmap_posix.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/util/mmap_posix.cpp b/src/mongo/util/mmap_posix.cpp index b992203b935..7eb5f062045 100644 --- a/src/mongo/util/mmap_posix.cpp +++ b/src/mongo/util/mmap_posix.cpp @@ -29,8 +29,12 @@ using namespace mongoutils; namespace mongo { - - const size_t g_minOSPageSizeBytes = sysconf( _SC_PAGESIZE ); + static size_t fetchMinOSPageSizeBytes() { + size_t minOSPageSizeBytes = sysconf( _SC_PAGESIZE ); + minOSPageSizeBytesTest(minOSPageSizeBytes); + return minOSPageSizeBytes; + } + const size_t g_minOSPageSizeBytes = fetchMinOSPageSizeBytes(); MemoryMappedFile::MemoryMappedFile() { fd = 0; |