I have this error while pushing my project to tfs GIT.
fatal: Out of memory, malloc failed (tried to allocate 889192448 bytes)
So what it basically requires is the free memory of 889192448 bytes (889MB Approx). This error occurs for 2 reasons
To check the free memory on Linux based systems.
free -h
If free memory is greater than the required memory, then you don't have to do anything here, otherwise you need to add the swap memory to increase the available free space on RAM.
If the free memory of RAM is already in place for the required memory, then you need to configure your git to utilise this. You do this with the following:
git config pack.packSizeLimit 1g
git config pack.deltaCacheSize 1g
git config pack.windowMemory 1g
git config core.packedGitLimit 1g
git config core.packedGitWindowSize 1g
Hope this helps.