diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2009-04-08 13:28:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-08 22:58:43 -0700 |
commit | de551d472ed65fa570d9456e8498348fe4c8e7d8 (patch) | |
tree | 6f5cbc2f918d0de0220cd2d1b58af9815c4e4696 /graph.c | |
parent | Documentation: clarify .gitattributes search (diff) | |
download | tgif-de551d472ed65fa570d9456e8498348fe4c8e7d8.tar.xz |
process_{tree,blob}: Remove useless xstrdup calls
The name of the processed object was duplicated for passing it to
add_object(), but that already calls path_name, which allocates a new
string anyway. So the memory allocated by the xstrdup calls just went
nowhere, leaking memory.
This reduces the RSS usage for a "rev-list --all --objects" by about 10% on
the gentoo repo (fully packed) as well as linux-2.6.git:
gentoo:
| old | new
----------------|-------------------------------
RSS | 1537284 | 1388408
VSZ | 1816852 | 1667952
time elapsed | 1:49.62 | 1:48.99
min. page faults| 417178 | 379919
linux-2.6.git:
| old | new
----------------|-------------------------------
RSS | 324452 | 292996
VSZ | 491792 | 460376
time elapsed | 0:14.53 | 0:14.28
min. page faults| 89360 | 81613
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
0 files changed, 0 insertions, 0 deletions