@matheusbsbs / matheus-bagliano / commits / 8435a9cb26
Fork 0

Account for tree entry memory costs in fast-import.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Aug 25, 2006 at 14:53 UTC 8435a9cb2662ca4326e96ea78d58b9376fb21f7e
1 file changed +1
fast-import.c
+1
@@ -516,6 +516,7 @@ static struct tree_entry* new_tree_entry()
516
517 if (!avail_tree_entry) {
518 unsigned int n = tree_entry_alloc;
519 + total_allocd += n * sizeof(struct tree_entry);
520 avail_tree_entry = e = xmalloc(n * sizeof(struct tree_entry));
521 while (n--) {
522 *((void**)e) = e + 1;