aboutsummaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-03-18 15:15:32 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 20:59:25 -0700
commitc639eea3a17e8b856ef591e1264ce26e2b2096ab (patch)
treeb52bd1915c8d2477304549c22a0ada6da6e69027 /lib.c
parentMake the preprocessor use the C parser, and then evaluate preprocessor (diff)
downloadsparse-c639eea3a17e8b856ef591e1264ce26e2b2096ab.tar.gz
sparse-c639eea3a17e8b856ef591e1264ce26e2b2096ab.tar.bz2
sparse-c639eea3a17e8b856ef591e1264ce26e2b2096ab.zip
Clear allocation statistics when clearing an allocator.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 0c0d9ac..b3f67cd 100644
--- a/lib.c
+++ b/lib.c
@@ -81,6 +81,9 @@ void drop_all_allocations(struct allocator_struct *desc)
struct allocation_blob *blob = desc->blobs;
desc->blobs = NULL;
+ desc->allocations = 0;
+ desc->total_bytes = 0;
+ desc->useful_bytes = 0;
while (blob) {
struct allocation_blob *next = blob->next;
free(blob);