Git rebase命中"内存不足,malloc失败"错误

时间:2014-10-03 19:15:08

标签: git

当我试图改造回购时:

git rebase XXX YYY

我收到“内存不足,malloc失败”错误:

First, rewinding head to replay your work on top of it...
fatal: Out of memory, malloc failed (tried to allocate 34537367 bytes)

git encountered an error while preparing the patches to replay
these revisions:

    3d5a7259c57b6b8a86fd6f7c44e6efa25a0e9db4..450ac9a6cf85475ab1a38b763f2f9a836a
4ba6a0

As a result, git cannot rebase them.

如果我使用樱桃挑选它没有错误:

git checkout XXX
git cherry-pick YYY

我在Windows版本1.9.4-preview20140815上使用Git。该机器有8GB RAM,回购中没有大于100MB的文件,以下是与包装相关的设置:

[core]
    packedGitWindowSize = 256m
    packedGitLimit = 256m

[pack]
    packSizeLimit = 2g
    threads = 2
    deltaCacheSize = 256m
    windowMemory = 256m

1 个答案:

答案 0 :(得分:1)

首先,1.9.4-preview20140815不再是最新的git版本。您可以下载最新版本here

另外,如果您认为Git使用的Cygwin 32位超过4GB的ram,您可以切换到Cygwin 64bits