2
 git clone http://vkaul@stash.int.linz.jumio.com/git/BUILD/build-tools.git
cloning into 'build-tools'...
fatal: Out of memory, malloc failed (tried to allocate 2000000000 bytes)
fatal: write error: Invalid argument

I know this question was asked before but in that case the workaround was increasing the RAM. Right now it is strange the repository is 2.2GB big and I have 5.5 GB free RAM and 50GB free hard disk. Why will this error occur? Any idea?

vkaul11
  • 4,098
  • 12
  • 47
  • 79
  • Likely dupe of http://stackoverflow.com/q/7607970/877115. Also check this out: http://stackoverflow.com/a/1590232/877115. Both list solutions that don't involve increasing RAM. – Christopher Aug 27 '12 at 18:51
  • I wanted a non scp solution. Given that other people were able to clone and I was unable to do so. Other solutions in the above links are very much RAM and hard drive related, which is not my problem. – vkaul11 Aug 27 '12 at 19:20

2 Answers2

1

There is a configuration property called packSizeLimit. In my Git installation it is set to 2G by default. Maybe this is also the case with your installation. You can check this by doing

git config -l

on the command line and look if there is an entry called pack.packSizeLimit. If so, try to increase that value.

dunni
  • 43,386
  • 10
  • 104
  • 99
  • Has that changed since 2011? [This answer](http://stackoverflow.com/a/7608084/877115) suggests git doesn't look at packSizeLimit – Christopher Aug 27 '12 at 21:09
  • I did try to increase the packetsizelimit to 4g instead of 2g but it gave me an error in wrong packetsize. Now I changed it to 3g, but it gives the same error. $ git config --global pack.packsizelimit 3g vkaul@NBVK /c/GIT_build $ git clone http://vkaul@stash.int.linz.jumio.com/git/BUILD/build-tools.git Cloning into 'build-tools'... fatal: Out of memory, malloc failed (tried to allocate 2000000000 bytes) fatal: write error: Invalid argument – vkaul11 Aug 27 '12 at 22:19
1

I got a similar issue on Windows using MSysGit 32 bits. The git 64 bits from Cygwin did the job. Maybe your local machine in 32 bits and the other server is 64 bits...

My original answer is available on question Git on Windows, “Out of memory - malloc failed”.

Community
  • 1
  • 1
oHo
  • 51,447
  • 27
  • 165
  • 200
  • Please don't create duplicate answers. It's generally [frowned upon](http://meta.stackexchange.com/q/104227/20270). If you think the questions are duplicates, you can [vote to close it](http://stackoverflow.com/help/privileges/close-questions) once you gain enough rep, or [flag it](http://stackoverflow.com/help/privileges/flag-posts) – Hasturkun Aug 29 '13 at 17:47
  • You are right @Hasturkun, duplicating the same answer is not a good solution (thanks for the links). These questions are similar but not actually duplicates... I have already reformulated the answer to the current question context. However I have also copy-pasted (duplicated) the linked answer. I my case, a good way to process may be just to put the same answer content (without the copy-paste) within a comment of the question... Or maybe I should more adapt my similar answer to the question context... What about you? Cheers ;) – oHo Aug 30 '13 at 08:00