summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Maier <maierman@web.de>2014-05-26 19:16:22 +0200
committerNils Maier <maierman@web.de>2014-05-26 21:34:49 +0200
commitf8db60e54e59a4e2e0a4e258ab5ba2c88ba4dfa9 (patch)
tree2fff0a54ec690c48a6b55a2573de038a8d6712a6 /src
parentdd8e4b0ad0ddf3e6ca80f6ef3c0fb73c06843fb9 (diff)
OSX: Use F_NOCACHE instead of F_GLOBAL_NOCACHE
The latter persists for the lifetime of the file, while the former affects only the current descriptor.
Diffstat (limited to 'src')
-rw-r--r--src/AbstractDiskWriter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc
index fe547e62..e3653233 100644
--- a/src/AbstractDiskWriter.cc
+++ b/src/AbstractDiskWriter.cc
@@ -220,9 +220,9 @@ int openFileWithFlags(const std::string& filename, int flags,
util::safeStrerror(errNum).c_str()),
errCode);
}
- // This may reduce memory consumption on Mac OS X. Not tested.
#if defined(__APPLE__) && defined(__MACH__)
- fcntl(fd, F_GLOBAL_NOCACHE, 1);
+ // This may reduce memory consumption on Mac OS X.
+ fcntl(fd, F_NOCACHE, 1);
#endif // __APPLE__ && __MACH__
return fd;
}