summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-09-24 17:04:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-09-24 17:04:53 +0200
commitfd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b (patch)
treeeac5159648bb98ad58ad33efb66979babce29cc3 /lib
parentf132b2e073b5c129ab9c6fa620ceb093cad2e18a (diff)
downloadbarebox-fd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b.tar.gz
barebox-fd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b.tar.xz
add debug for xmalloc and xrealloc
Diffstat (limited to 'lib')
-rw-r--r--lib/xfuncs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xfuncs.c b/lib/xfuncs.c
index 2a2ec75979..dbe0223314 100644
--- a/lib/xfuncs.c
+++ b/lib/xfuncs.c
@@ -32,6 +32,8 @@ void *xmalloc(size_t size)
if (!(p = malloc(size)))
panic("ERROR: out of memory\n");
+ debug("xmalloc %p (size %d)\n", p, size);
+
return p;
}
@@ -42,6 +44,8 @@ void *xrealloc(void *ptr, size_t size)
if (!(p = realloc(ptr, size)))
panic("ERROR: out of memory\n");
+ debug("xrealloc %p -> %p (size %d)\n", ptr, p, size);
+
return p;
}