summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
authortodd stecher <todd.stecher@gmail.com>2009-02-17 16:16:35 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-02-18 18:08:32 -0800
commitc441f58dedc465f59060296815a0bc7f9aeb743f (patch)
treef6443ed770146ba26e9c09370c1a9bddc22252fe /source3/include/includes.h
parentcdcd525a05ce851dcb338dfa8c9be3009194aa96 (diff)
downloadsamba-c441f58dedc465f59060296815a0bc7f9aeb743f.tar.gz
samba-c441f58dedc465f59060296815a0bc7f9aeb743f.tar.bz2
samba-c441f58dedc465f59060296815a0bc7f9aeb743f.zip
S3: Allow SMBD processes to survive in low memory condidtions
This commit adds a configure argument which allows for setting MADV_PROTECT in the madvise() API. With this enabled the kernel won't kill SMBD when it's running low on memory.
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r--source3/include/includes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index a9f813b7f8..1906830d48 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -241,6 +241,10 @@ typedef int ber_int_t;
#include <aio.h>
#endif
+#ifdef WITH_MADVISE_PROTECTED
+#include <sys/mman.h>
+#endif
+
/* Special macros that are no-ops except when run under Valgrind on
* x86. They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
#if HAVE_VALGRIND_MEMCHECK_H