vkaul11
vkaul11

Reputation: 4214

git clone out of memory even with 5.6GB RAM free and 50 GB hard disk

 git clone http://[email protected]/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?

Upvotes: 2

Views: 4744

Answers (2)

oHo
oHo

Reputation: 54601

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”.

Upvotes: 1

dunni
dunni

Reputation: 44545

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.

Upvotes: 1

Related Questions