git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
memory: stats for malloc
[dpdk.git]
/
lib
/
librte_malloc
/
malloc_elem.c
diff --git
a/lib/librte_malloc/malloc_elem.c
b/lib/librte_malloc/malloc_elem.c
index
0d2fdb6
..
0127917
100644
(file)
--- a/
lib/librte_malloc/malloc_elem.c
+++ b/
lib/librte_malloc/malloc_elem.c
@@
-231,7
+231,10
@@
malloc_elem_free(struct malloc_elem *elem)
elem->state = ELEM_FREE;
elem->pad = 0;
}
+ /* decrease heap's count of allocated elements */
+ elem->heap->alloc_count--;
rte_spinlock_unlock(&(elem->heap->lock));
+
return 0;
}