diff options
author | Aaron <aaron@10gen.com> | 2009-01-14 17:09:51 -0500 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-01-14 17:09:51 -0500 |
commit | ad1f6b3cbdd1183eedc04f98fa813e63ce68a408 (patch) | |
tree | cc0498e49d55eae8e8e1cbb7f494b085a732a45d /util/mmap.cpp | |
parent | 023535d844a43627d1f2c934ffd349f4355ed4c2 (diff) | |
download | mongo-ad1f6b3cbdd1183eedc04f98fa813e63ce68a408.tar.gz |
Put our code in 'mongo' namespace
Diffstat (limited to 'util/mmap.cpp')
-rw-r--r-- | util/mmap.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/util/mmap.cpp b/util/mmap.cpp index 8d3d2447692..447775cb2ad 100644 --- a/util/mmap.cpp +++ b/util/mmap.cpp @@ -19,6 +19,8 @@ #include "stdafx.h" #include "mmap.h" +namespace mongo { + set<MemoryMappedFile*> mmfiles; MemoryMappedFile::~MemoryMappedFile() { @@ -49,8 +51,12 @@ void MemoryMappedFile::updateLength( const char *filename, int &length ) const { #if defined(_WIN32) +} // namespace mongo + #include "windows.h" +namespace mongo { + MemoryMappedFile::MemoryMappedFile() { fd = 0; maphandle = 0; @@ -120,12 +126,16 @@ void MemoryMappedFile::flush(bool) { #else +} // namespace mongo + #include <errno.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +namespace mongo { + MemoryMappedFile::MemoryMappedFile() { fd = 0; maphandle = 0; @@ -208,3 +218,5 @@ void MemoryMappedFile::flush(bool sync) { void* MemoryMappedFile::map(const char *filename) { return map( filename , file_size( filename ) ); // file_size is from boost } + +} // namespace mongo |