I have this error while pushing my project to tfs GIT.
fatal: Out of memory, malloc failed (tried to allocate 889192448 bytes)
I solved this by adding memory to my server which was 512MB so I extend it to 2GB