Merge branch 'sp/mmap' into next

* sp/mmap:
  Increase packedGit{Limit,WindowSize} on 64 bit systems.
This commit is contained in:
Junio C Hamano
2007-01-06 22:58:01 -08:00
2 changed files with 18 additions and 8 deletions

View File

@@ -125,9 +125,12 @@ core.packedGitWindowSize::
more quickly. Smaller window sizes will negatively affect
performance due to increased calls to the operating system's
memory manager, but may improve performance when accessing
a large number of large pack files. Default is 32 MiB,
which should be reasonable for all users/operating systems.
You probably do not need to adjust this value.
a large number of large pack files.
+
Default is 1 MiB if NO_MMAP was set at compile time, otherwise 32
MiB on 32 bit platforms and 1 GiB on 64 bit platforms. This should
be reasonable for all users/operating systems. You probably do
not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.
@@ -136,9 +139,10 @@ core.packedGitLimit::
from pack files. If Git needs to access more than this many
bytes at once to complete an operation it will unmap existing
regions to reclaim virtual address space within the process.
Default is 256 MiB, which should be reasonable for all
users/operating systems, except on the largest projects.
You probably do not need to adjust this value.
+
Default is 256 MiB on 32 bit platforms and 8 GiB on 64 bit platforms.
This should be reasonable for all users/operating systems, except on
the largest projects. You probably do not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.

View File

@@ -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