From c7da9992cb39fc84a6a915dd2158beaf5e616617 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Sep 1998 03:00:20 +0000 Subject: gto ri of a bunch more #ifdef LARGE_SMB_OFF_T checks by introducing a SOFF_T() macro for setting an SMB_OFF_T variable also limited mmap based reads to MAX_MMAP_SIZE. We really can't mmap 2^50 bytes due to virtual address space problems. (This used to be commit 4e784b18899eddd2399a51fa7d8c219560432922) --- source3/include/local.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/include/local.h') diff --git a/source3/include/local.h b/source3/include/local.h index ead97e565d..bf41af70d7 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -125,6 +125,11 @@ /* the size of the uid cache used to reduce valid user checks */ #define UID_CACHE_SIZE 4 +/* if mmap is enabled, then this is the maximum size of file to use + the mmap code on. We don't want to mmap huge files as virtual + address spaces are limited */ +#define MAX_MMAP_SIZE (100*0x100000) + /* the following control timings of various actions. Don't change them unless you know what you are doing. These are all in seconds */ #define DEFAULT_SMBD_TIMEOUT (60*60*24*7) -- cgit