Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit c1ddc3f

Browse files
plerichepatthoyts
authored andcommitted
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 <[email protected]> Signed-off-by: Pat Thoyts <[email protected]>
1 parent 9de1002 commit c1ddc3f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
14251425
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
14261426
compat/win32/pthread.o compat/win32/syslog.o \
14271427
compat/win32/dirent.o
1428+
BASIC_LDFLAGS += -Wl,--large-address-aware
14281429
EXTLIBS += -lws2_32
14291430
PTHREAD_LIBS =
14301431
X = .exe

0 commit comments

Comments
 (0)