在Windows上的Git,“内存不足 - malloc失败” [英] Git on Windows, "Out of memory - malloc failed"

查看:137
本文介绍了在Windows上的Git,“内存不足 - malloc失败”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经遇到了存储库的问题,并尝试几乎所有可能的配置设置发现在那里例如。 pack.WindowMemory等等等等。



我相信有人已经签入了一个大文件到远程仓库,现在每当我尝试拉或推时,GIT都会尝试打包它并且耗尽内存:

 自动打包存储库以获得最佳性能。您也可以
手动运行git gc。有关更多信息,请参阅git help gc。
计数对象:6279,完成。
压缩对象:100%(6147/6147),完成。
fatal:内存不足,malloc失败(试图分配1549040327字节)
错误:无法运行重新打包

已尝试 git gc & git重新包装与各种选项,但不断返回相同的错误。



几乎放弃和即将创建一个新的回购,但认为我会问周围第一:)

解决方案

我找到了一个解决方案这里为我工作。



在.git / config文件(客户端和/或服务器)如下:

  [core] 
packedGitLimit = 128m
packedGitWindowSize = 128m

[pack]
deltaCacheSize = 128m
packSizeLimit = 128m
windowMemory = 128m


Have run into a problem with repository and tried almost every possible config setting found out there eg. pack.WindowMemory etc etc

I believe someone has checked in a large file to remote repository and now each time I try and pull or push to it, GIT tries to pack it and runs out of memory:

Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 6279, done.
Compressing objects: 100% (6147/6147), done.
fatal: Out of memory, malloc failed (tried to allocate 1549040327 bytes)
error: failed to run repack

Have tried git gc & git repack with various options but keeps returning same error.

Almost given up and about to just create a new repo but thought I'd ask around first :)

解决方案

I found a solution Here that worked for me.

In .git/config file (client and/or server) I added the following:

[core]
  packedGitLimit = 128m
  packedGitWindowSize = 128m

[pack]
  deltaCacheSize = 128m
  packSizeLimit = 128m
  windowMemory = 128m

这篇关于在Windows上的Git,“内存不足 - malloc失败”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆