diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-27 13:28:31 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-27 13:28:31 -0400 |
commit | 2e596ac2bb2e7e886845a1be6455e1b0c26cb351 (patch) | |
tree | 504543472c70e84ddd3d8393436b29381eba0cb0 /util/file_allocator.h | |
parent | 3f8a0d553ae2c77d797fe420aed69c1c960e1638 (diff) | |
download | mongo-2e596ac2bb2e7e886845a1be6455e1b0c26cb351.tar.gz |
windows
Diffstat (limited to 'util/file_allocator.h')
-rw-r--r-- | util/file_allocator.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/file_allocator.h b/util/file_allocator.h index 71cfa2cc5d2..3214b72f49a 100644 --- a/util/file_allocator.h +++ b/util/file_allocator.h @@ -107,7 +107,10 @@ namespace mongo { } static void ensureLength( int fd , long size ){ -#if defined(__linux__) +#if defined(_WIN32) + // we don't zero on windows + // TODO : we should to avoid fragmentation +#elif defined(__linux__) posix_fallocate(fd,0,size); #else off_t filelen = lseek(fd, 0, SEEK_END); |