summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 762656e)
raw | patch | inline | side by side (parent: 762656e)
author | Björn Steinbrink <B.Steinbrink@gmx.de> | |
Sun, 29 Jun 2008 01:21:25 +0000 (03:21 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 29 Jun 2008 02:50:56 +0000 (19:50 -0700) |
When run in batch mode, git cat-file never frees the memory for the blob
contents it is printing. This quickly adds up and causes git-svn to be
hardly usable for imports of large svn repos, because it uses cat-file in
batch mode and cat-file's memory usage easily reaches several hundred MB
without any good reason.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contents it is printing. This quickly adds up and causes git-svn to be
hardly usable for imports of large svn repos, because it uses cat-file in
batch mode and cat-file's memory usage easily reaches several hundred MB
without any good reason.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-cat-file.c | patch | blob | history |
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index bd343efae7d6cc6fddef4df5c3433b97bd640d3c..880e75af5e1951689a417aa47e64f99a20d46ae6 100644 (file)
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
write_or_die(1, contents, size);
printf("\n");
fflush(stdout);
+ free(contents);
}
return 0;