Skip to content
  • Sergey Vlasov's avatar
    Rework object refs tracking to reduce memory usage · 4a4e6fd7
    Sergey Vlasov authored
    
    
    Store pointers to referenced objects in a variable sized array instead
    of linked list.  This cuts down memory usage of utilities which use
    object references; e.g., git-fsck-objects --full on the git.git
    repository consumes about 2 MB of memory tracked by Massif instead of
    7 MB before the change.  Object refs are still the biggest consumer of
    memory (57%), but the malloc overhead for a single block instead of a
    linked list is substantially smaller.
    
    Signed-off-by: default avatarSergey Vlasov <vsu@altlinux.ru>
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    4a4e6fd7