I have this error while pushing my project to tfs GIT.
fatal: Out of memory, malloc failed (tried to allocate 889192448 bytes)
I fixed this by closing applications that use a lot of memory (visual studio, sql server), and pushing again