Code

Account for tree entry memory costs in fast-import.
authorShawn O. Pearce <spearce@spearce.org>
Fri, 25 Aug 2006 18:53:32 +0000 (14:53 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 14 Jan 2007 07:15:07 +0000 (02:15 -0500)
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c

index 1842d0738bda3d7f368958a411427215035e24e6..311db4e6d52e9aeef69337001bced37518ae6882 100644 (file)
@@ -516,6 +516,7 @@ static struct tree_entry* new_tree_entry()
 
        if (!avail_tree_entry) {
                unsigned int n = tree_entry_alloc;
+               total_allocd += n * sizeof(struct tree_entry);
                avail_tree_entry = e = xmalloc(n * sizeof(struct tree_entry));
                while (n--) {
                        *((void**)e) = e + 1;