Account for tree entry memory costs in fast-import.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
@ -516,6 +516,7 @@ static struct tree_entry* new_tree_entry()
|
|||||||
|
|
||||||
if (!avail_tree_entry) {
|
if (!avail_tree_entry) {
|
||||||
unsigned int n = tree_entry_alloc;
|
unsigned int n = tree_entry_alloc;
|
||||||
|
total_allocd += n * sizeof(struct tree_entry);
|
||||||
avail_tree_entry = e = xmalloc(n * sizeof(struct tree_entry));
|
avail_tree_entry = e = xmalloc(n * sizeof(struct tree_entry));
|
||||||
while (n--) {
|
while (n--) {
|
||||||
*((void**)e) = e + 1;
|
*((void**)e) = e + 1;
|
||||||
|
Reference in New Issue
Block a user