git:out of memory,malloc failed

来源:互联网 发布:300271华宇软件 编辑:程序博客网 时间:2024/06/08 06:45
 

repo sync时,出现这样的错误:out of memory,malloc failed
解决方法:在 repack时, 在 memory scale 使用比较小的 memory
这样就不会因为 small object 太多,很快耗尽所有 memory 。

 

$ git repack -adf --window=memory

然后再运行git gc时,就正常了。