diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-09-24 17:04:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-09-24 17:04:53 +0200 |
commit | fd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b (patch) | |
tree | eac5159648bb98ad58ad33efb66979babce29cc3 /lib | |
parent | f132b2e073b5c129ab9c6fa620ceb093cad2e18a (diff) | |
download | barebox-fd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b.tar.gz barebox-fd4cc5d0d370c4cf10a3a8d3884ea69cbd04305b.tar.xz |
add debug for xmalloc and xrealloc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xfuncs.c | 4 |
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; } |