加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 拉出警告时出错:次优打包 – 内存不足

发布时间:2020-12-13 19:17:48 所属栏目:Linux 来源:网络整理
导读:我试图做一个pull或git gc时一直遇到这个错误 警告:次优包装 – 内存不足 压缩对象:100%(10955/10955),完成. 致命:内存不足,malloc失败(试图分配827101023字节) 错误:无法运行重新包装 我该如何解决这个问题? 解决方法 This thread建议 run ? git repa
我试图做一个pull或git gc时一直遇到这个错误

警告:次优包装 – 内存不足
压缩对象:100%(10955/10955),完成.
致命:内存不足,malloc失败(试图分配827101023字节)
错误:无法运行重新包装

我该如何解决这个问题?

解决方法

This thread建议

run ? git repack -adf --window=memory ? on the repo where memory is escalated appropriately for your machine.

这与SO问题“Repack of Git repository fails”几乎完全相同.

git repack -a -d --window-memory 10m --max-pack-size 20m

但是,Mark Longair将于warn you that:

Your solution has got you a working copy locally and remotely,but will cause problems again when the remote repository decides to repack itself again.

因此,配置pack.windowMemory和pack.packSizeLimit是一个更安全的解决方案,以及检查core.packedxxx和core.deltaxxx的配置.

对于Windows上的msysgit,此评论提到:

git config --global pack.windowMemory 256m

worked for me (had have memory alloc error on 64 bit windows (Git-1.7.6-preview20110708.exe)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读