Title

[git] out of memory malloc failed 解决

[git] out of memory malloc failed 解决 - 个人文章 - SegmentFault 思否

git提交时,报错
"Fatal: Out of memory, malloc failed (tried to allocate 42446849 bytes)"

 

解决这个报错
1、需要把windowMemory容量调大(默认10m,调整为256m)
2、建议同时调整postbuffer的容量。
3、最后还需要git repack

打开cmd,分三次输入三行代码并回车

git config --global pack.windowMemory 256m
git config --global http.postbuffer 42446849
git repack

或者修改本地的.gitconfig文件

[http]
postbuffer = 42446849
[pack]
windowMemory = 256m

再在cmd中输入git repack,回车。

完成之后再次提交

posted @ 2024-01-31 14:01  WAASSTT  阅读(2106)  评论(0)    收藏  举报
Title