Re: git-revert is a memory hog
- From
Jeff King <peff@peff.net>
- Date
- Jan 29, 2008, 22:20 UTC
- Message-ID
- <20080129222007.GA3985@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LFD.1.00.0801300844170.28476@www.l.google.com>
On Wed, Jan 30, 2008 at 08:51:09AM +1100, Linus Torvalds wrote:
Show 5 quoted lines
> I definitely can reproduce it, it's horrid. > > This is from "top" fairly late in the game, but with the thing not even > done yet. Current git, pretty much fully (and fairly aggressively) packed > current kernel repo, and using "diff.renamelmit=0".
Hrm, setting diff.renamelimit to 0 lets me reproduce (I thought I tried it before, but clearly not...).
The culprit seems to be diffcore-rename.c:476:
mx = xmalloc(sizeof(*mx) * num_create * num_src);
Where that ends up allocating about 450M. I think this is exactly the sort of case that renamelimit was introduced to address.
-Peff