diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-09-21 15:22:15 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-09-21 15:22:15 -0400 |
commit | e0496df06de6f1ef0d2c97187085d6862dcb715c (patch) | |
tree | 37d4368b30f846097747576d7beb8493728d4ce1 /db/extsort.h | |
parent | 5f21ef37f7129baec402cf644bde193a5268ccb3 (diff) | |
download | mongo-e0496df06de6f1ef0d2c97187085d6862dcb715c.tar.gz |
use mmap instead of read
Diffstat (limited to 'db/extsort.h')
-rw-r--r-- | db/extsort.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/db/extsort.h b/db/extsort.h index 9e954e6ec7a..9a582035af3 100644 --- a/db/extsort.h +++ b/db/extsort.h @@ -35,19 +35,20 @@ namespace mongo { typedef pair<BSONObj,DiskLoc> Data; + private: class FileIterator : boost::noncopyable { public: - FileIterator( string file , int bufSize ); + FileIterator( string file ); ~FileIterator(); bool more(); Data next(); private: - int _fd; + MemoryMappedFile _file; char * _buf; - long _read; - long _length; + char * _end; }; + public: class Iterator { public: |