[cairo-commit] 2 commits - util/Makefile.am util/malloc-stats.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat Jan 31 18:35:04 PST 2009
util/Makefile.am | 2 +-
util/malloc-stats.c | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 64d1c7587041f765b393e1802a10cce02b807ad1
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Jan 31 21:34:21 2009 -0500
[util] Fix memset bug in malloc-stats
diff --git a/util/malloc-stats.c b/util/malloc-stats.c
index 39ffa4a..74381fb 100644
--- a/util/malloc-stats.c
+++ b/util/malloc-stats.c
@@ -39,8 +39,8 @@
#include <string.h>
struct alloc_stat_t {
- uint32_t num;
- uint64_t size;
+ unsigned int num;
+ unsigned long long size;
};
struct alloc_stats_t {
@@ -139,7 +139,6 @@ static void
func_stats_add (const void *caller, int is_realloc, size_t size)
{
int i;
- const char *name;
struct func_stat_t *elt;
alloc_stats_add (&total_allocations, is_realloc, size);
@@ -158,7 +157,7 @@ func_stats_add (const void *caller, int is_realloc, size_t size)
func_stats[i] = elt;
elt->addr = caller;
elt->name = resolve_addr (caller);
- memset (&elt->stat, 0, sizeof (struct alloc_stat_t));
+ memset (&elt->stat, 0, sizeof (struct alloc_stats_t));
}
alloc_stats_add (&elt->stat, is_realloc, size);
@@ -254,7 +253,7 @@ add_alloc_stats (struct alloc_stats_t *a, struct alloc_stats_t *b)
static void
dump_alloc_stats (struct alloc_stats_t *stats, const char *name)
{
- printf ("%8d %'11qd %8d %'11qd %8d %'11qd %s\n",
+ printf ("%8u %'11llu %8u %'11llu %8u %'11llu %s\n",
stats->total.num, stats->total.size,
stats->malloc.num, stats->malloc.size,
stats->realloc.num, stats->realloc.size,
commit b02aeb367dc4bada5412798fa93ce74f3d861273
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Jan 31 21:33:42 2009 -0500
[util] Don't link backtrace-symbols into malloc-stats
On my rawhide machine, seems like the glibc backgrace-symbols is now as
good as our private backtrace-symbols.
diff --git a/util/Makefile.am b/util/Makefile.am
index 895c516..56b941c 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -22,7 +22,7 @@ EXTRA_LTLIBRARIES += malloc-stats.la backtrace-symbols.la
backtrace_symbols_la_LIBADD = -lbfd -liberty
-malloc_stats_la_LIBADD = $(backtrace_symbols_la_LIBADD) backtrace-symbols.lo
+#malloc_stats_la_LIBADD = $(backtrace_symbols_la_LIBADD) backtrace-symbols.lo
EXTRA_DIST += \
COPYING \
More information about the cairo-commit
mailing list