aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-07-09 07:10:07 +0000
committerJunio C Hamano <gitster@pobox.com>2008-07-09 14:45:42 -0700
commiteac12e2d4d7fb9b388bdc88bf15cd86cbde91dfd (patch)
tree68958e986cce49de347dd60afdcbd8cbd344c87a /hash.c
parente09c4e753c337d914f4eb7a05cb5e8bbfc362489 (diff)
downloadgit-eac12e2d4d7fb9b388bdc88bf15cd86cbde91dfd.tar.gz
git-eac12e2d4d7fb9b388bdc88bf15cd86cbde91dfd.tar.xz
Correct pack memory leak causing git gc to try to exceed ulimit
When recursing to unpack a delta base we must unuse_pack() so that the pack window for the current object does not remain pinned in memory while the delta base is itself being unpacked and materialized for our use. On a long delta chain of 50 objects we may need to access 6 different windows from a very large (>3G) pack file in order to obtain all of the delta base content. If the process ulimit permits us to map/allocate only 1.5G we must release windows during this recursion to ensure we stay within the ulimit and transition memory from pack cache to standard malloc, or other mmap needs. Inserting an unuse_pack() call prior to the recursion allows us to avoid pinning the current window, making it available for garbage collection if memory runs low. This has been broken since at least before 1.5.1-rc1, and very likely earlier than that. Its fixed now. :) Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions