From 9ec032678c332a1a06c1a8170b376ec7e2012877 Mon Sep 17 00:00:00 2001 From: Pierre le Riche Date: Mon, 28 May 2012 09:46:54 +0200 Subject: [PATCH] msysgit: Add the --large-address-aware linker directive to the makefile. This has the effect of increasing the address space from 2GB to 4GB under 64-bit Windows, reducing the likelihood of an "out of memory" error when e.g. repacking a large repository. The test suite passes with this patch, with and without the MEM_TOP_DOWN flag added to all VirtualAlloc calls. While this is no guarantee that there are no issues with large memory support (it could break Git on other setups than mine, for example), it at least increases the chance that nothing obvious goes wrong (such as errors introduced by faulty sign extension, say, with ssize_t). [PT: Resolves github issue #12] Signed-off-by: Pierre le Riche Signed-off-by: Pat Thoyts --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index f34a3fbbf6..b1ca05b724 100644 --- a/Makefile +++ b/Makefile @@ -1345,6 +1345,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) COMPAT_OBJS += compat/mingw.o compat/winansi.o \ compat/win32/pthread.o compat/win32/syslog.o \ compat/win32/poll.o compat/win32/dirent.o + BASIC_LDFLAGS += -Wl,--large-address-aware EXTLIBS += -lws2_32 PTHREAD_LIBS = X = .exe -- 2.11.4.GIT