diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-12-24 20:31:28 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-12-24 20:31:28 +0300 |
commit | 88db624127e11d4a1d1000a5ebcfb6757a05f3a4 (patch) | |
tree | 27c4d606175d36bda0f323fd8bc090a667132244 /accel-pptpd/memdebug.c | |
parent | 59f691793e9270026214abffceb06f64d365fee3 (diff) | |
download | accel-ppp-88db624127e11d4a1d1000a5ebcfb6757a05f3a4.tar.gz accel-ppp-88db624127e11d4a1d1000a5ebcfb6757a05f3a4.zip |
cli: show cpu and memory utilization in statistics
Diffstat (limited to 'accel-pptpd/memdebug.c')
-rw-r--r-- | accel-pptpd/memdebug.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accel-pptpd/memdebug.c b/accel-pptpd/memdebug.c index d36779e1..c443ec1a 100644 --- a/accel-pptpd/memdebug.c +++ b/accel-pptpd/memdebug.c @@ -80,7 +80,7 @@ void __export md_free(void *ptr, const char *fname, int line) } if (mem->magic2 != *(uint64_t*)(mem->data + mem->size)) { - printf("memory corruption:\nmalloc(%lu) at %s:%i\nfree at %s:%i\n", mem->size, mem->fname, mem->line, fname, line); + printf("memory corruption:\nmalloc(%lu) at %s:%i\nfree at %s:%i\n", (long unsigned)mem->size, mem->fname, mem->line, fname, line); abort(); } @@ -106,7 +106,7 @@ void __export *md_realloc(void *ptr, size_t size, const char *fname, int line) } if (mem->magic2 != *(uint64_t*)(mem->data + mem->size)) { - printf("memory corruption:\nmalloc(%lu) at %s:%i\nfree at %s:%i\n", mem->size, mem->fname, mem->line, fname, line); + printf("memory corruption:\nmalloc(%lu) at %s:%i\nfree at %s:%i\n", (long unsigned)mem->size, mem->fname, mem->line, fname, line); abort(); } @@ -140,11 +140,11 @@ static void siginfo(int num) spin_lock(&mem_list_lock); list_for_each_entry(mem, &mem_list, entry) { - printf("%s:%i %lu\n", mem->fname, mem->line, mem->size); + printf("%s:%i %lu\n", mem->fname, mem->line, (long unsigned)mem->size); total += mem->size; } spin_unlock(&mem_list_lock); - printf("total = %lu\n", total); + printf("total = %lu\n", (long unsigned)total); } static void siginfo2(int num) @@ -154,7 +154,7 @@ static void siginfo2(int num) spin_lock(&mem_list_lock); list_for_each_entry(mem, &mem_list, entry) { if (mem->magic1 != MAGIC1 || mem->magic2 != *(uint64_t*)(mem->data + mem->size)) - printf("%s:%i %lu\n", mem->fname, mem->line, mem->size); + printf("%s:%i %lu\n", mem->fname, mem->line, (long unsigned)mem->size); } spin_unlock(&mem_list_lock); } |