diff options
-rw-r--r-- | environment.c | 4 | ||||
-rw-r--r-- | git-compat-util.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/environment.c b/environment.c index e559fd69c7..09976c7bf6 100644 --- a/environment.c +++ b/environment.c @@ -23,8 +23,8 @@ char *git_log_output_encoding; int shared_repository = PERM_UMASK; const char *apply_default_whitespace; int zlib_compression_level = Z_DEFAULT_COMPRESSION; -size_t packed_git_window_size = 32 * 1024 * 1024; -size_t packed_git_limit = 256 * 1024 * 1024; +size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE; +size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT; int pager_in_use; int pager_use_color = 1; diff --git a/git-compat-util.h b/git-compat-util.h index 5d9eb2615b..4764087d85 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -92,12 +92,17 @@ extern void set_warn_routine(void (*routine)(const char *warn, va_list params)); extern void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); extern int git_munmap(void *start, size_t length); +#define DEFAULT_PACKED_GIT_WINDOW_SIZE (1 * 1024 * 1024) + #else /* NO_MMAP */ #include <sys/mman.h> +#define DEFAULT_PACKED_GIT_WINDOW_SIZE (32 * 1024 * 1024) #endif /* NO_MMAP */ +#define DEFAULT_PACKED_GIT_LIMIT (256 * 1024 * 1024) + #ifdef NO_SETENV #define setenv gitsetenv extern int gitsetenv(const char *, const char *, int); |