diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-01-24 18:10:10 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-01-27 17:19:06 -0500 |
commit | c4c0f3b6b849deba4b6ebb31ab13b0b26b626c55 (patch) | |
tree | 6f6ad5a7db8c1ffda15c0477de340eba854c5605 /src/mongo/util/processinfo.h | |
parent | 9384c692b89034008c419e3779282a41f00a4a61 (diff) | |
download | mongo-c4c0f3b6b849deba4b6ebb31ab13b0b26b626c55.tar.gz |
On Windows platforms code was added to zero-fill each newly allocated data file in order to work around Windows KB http://support.microsoft.com/kb/2731284. The KB only applies for Windows 7 and Windows 2008 Server installations, so there is no need to do it on each and every system.
This fix restricts the zeroing-out code to only versions, which have had the bug. It will not check whether the hot fix has been installed.
Diffstat (limited to 'src/mongo/util/processinfo.h')
-rw-r--r-- | src/mongo/util/processinfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/util/processinfo.h b/src/mongo/util/processinfo.h index 1b1d7620a7e..13007767dc8 100644 --- a/src/mongo/util/processinfo.h +++ b/src/mongo/util/processinfo.h @@ -104,6 +104,12 @@ namespace mongo { static bool blockInMemory(const void* start); /** + * This is a OS specific call, which determines whether files should be zero-filled at + * allocation time in order to avoid Microsoft KB 2731284. + */ + static bool isDataFileZeroingNeeded(); + + /** * @return a pointer aligned to the start of the page the provided pointer belongs to. * * NOTE requires blockCheckSupported() == true |