memory: use core.packedGitWindowSize=32m unless $cfg_git_no_mmap
commit0fba439f2136a058aa118ac0485938cb05058efe
authorKyle J. McKay <mackyle@gmail.com>
Sun, 21 Aug 2016 19:37:50 +0000 (21 12:37 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 21 Aug 2016 19:37:50 +0000 (21 12:37 -0700)
tree64cf3d11a8ba20b4c547ee23318a0742f7c82de6
parent69734174046a957ff3f7404119b974cd2e30611a
memory: use core.packedGitWindowSize=32m unless $cfg_git_no_mmap

The default value for core.packedGitWindowSize on a 64-bit platform
where Git was built WITHOUT setting NO_MMAP can lead to unwanted
memory blowout when running many packing threads.

Instead always set the 32-bit value (32 MiB).

However, on some platforms, Git must be built with NO_MMAP in order
to function properly.  Therefore provide an escape hatch in that
if $Girocco::Config::git_no_mmap is set to a true value then always
set core.packedGitWindowSize to 1 MiB instead (which is what happens
when Git is built with NO_MMAP).

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
shlib.sh