aboutsummaryrefslogtreecommitdiff
path: root/print_status_on_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'print_status_on_exit.c')
-rw-r--r--print_status_on_exit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/print_status_on_exit.c b/print_status_on_exit.c
index 686817e..e2363c9 100644
--- a/print_status_on_exit.c
+++ b/print_status_on_exit.c
@@ -64,8 +64,6 @@ void *malloc(size_t size)
initializing = 1;
init();
initializing = 0;
-
- fprintf(stdout, "jcheck: allocated %lu bytes of temp memory in %lu chunks during initialization\n", tmppos, tmpallocs);
}
else
{
@@ -78,12 +76,11 @@ void *malloc(size_t size)
}
else
{
- fprintf(stdout, "jcheck: too much memory requested during initialisation - increase tmpbuff size\n");
+ fprintf(stderr, "jcheck: too much memory requested during initialisation - increase tmpbuff size\n");
exit(1);
}
}
}
-
return myfn_malloc(size);
}
@@ -92,9 +89,7 @@ void free(void *ptr)
// something wrong if we call free before one of the allocators!
if (myfn_malloc == NULL)
init();
- if (ptr >= (void*) tmpbuff && ptr <= (void*)(tmpbuff + tmppos))
- fprintf(stdout, "freeing temp memory\n");
- else
+ if (!(ptr >= (void*) tmpbuff && ptr <= (void*)(tmpbuff + tmppos)))
myfn_free(ptr);
}