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

Commit

Permalink
msysgit: Add the --large-address-aware linker directive to the makefile.
Browse files Browse the repository at this point in the history
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 <github@pleasedontspam.me>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
  • Loading branch information
pleriche authored and dscho committed Dec 3, 2012
1 parent 0d0c4b7 commit e3054c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
BASIC_LDFLAGS += -Wl,--large-address-aware
EXTLIBS += -lws2_32
PTHREAD_LIBS =
X = .exe
Expand Down

0 comments on commit e3054c4

Please sign in to comment.