summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-04 22:28:08 -0500
committerJunio C Hamano <junkio@cox.net>2007-01-06 10:34:56 -0800
commit22bac0ea528fd419cb833cab5de79a36fad91524 (patch)
tree4a26b03c0af37b7a2a9dd1337944c813d0a98f61 /git-compat-util.h
parenteb92242f19e58de9c930220caf6bf1b83df54160 (diff)
downloadgit-22bac0ea528fd419cb833cab5de79a36fad91524.tar.gz
Increase packedGit{Limit,WindowSize} on 64 bit systems.
If we have a 64 bit address space we can easily afford to commit a larger amount of virtual address space to pack file access. So on these platforms we should increase the default settings of core.packedGit{Limit,WindowSize} to something that will better handle very large projects. Thanks to Andy Whitcroft for pointing out that we can safely increase these defaults on such systems. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index f243b86d32..55456da37c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -97,11 +97,17 @@ extern int git_munmap(void *start, size_t length);
#else /* NO_MMAP */
#include <sys/mman.h>
-#define DEFAULT_PACKED_GIT_WINDOW_SIZE (32 * 1024 * 1024)
+#define DEFAULT_PACKED_GIT_WINDOW_SIZE \
+ (sizeof(void*) >= 8 \
+ ? 1 * 1024 * 1024 * 1024 \
+ : 32 * 1024 * 1024)
#endif /* NO_MMAP */
-#define DEFAULT_PACKED_GIT_LIMIT (256 * 1024 * 1024)
+#define DEFAULT_PACKED_GIT_LIMIT \
+ (sizeof(void*) >= 8 \
+ ? 8 * 1024 * 1024 * 1024 \
+ : 256 * 1024 * 1024)
#ifdef NO_SETENV
#define setenv gitsetenv