From 22bac0ea528fd419cb833cab5de79a36fad91524 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 4 Jan 2007 22:28:08 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- git-compat-util.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'git-compat-util.h') 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 -#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 -- cgit v1.2.3