dmalloc

Nic Cave-Lynch nic at cvgenie.com
Wed Aug 6 08:15:36 CEST 2014


Hi people

I'm working on a custom routing module and I'm having problems with memory  
allocation. I've tried compiling with --enable-memcheck, having installed  
libdmalloc (with apt-get install libdmalloc-dev libdmalloc5).

make now fails as below.

In lib/resource.h there's a check for libdmalloc which then refers to  
_xFOO_leap functions which I guess were once included with libdmalloc, but  
they're not there now.

Is there a way of using libdmalloc, (or some other equivalent) that is  
currently operational?

Thanks

Nic C-L


make -C obj all
make[1]: Entering directory `/home/nic/projects/bird/obj'
set -e ; for a in lib conf ; do make -C $a subdir ; done
make[2]: Entering directory `/home/nic/projects/bird/obj/lib'
gcc -I../ -I../..  -g -O2 -pthread -Wall -Wstrict-prototypes  
-Wno-parentheses -Wno-pointer-sign -fno-strict-aliasing  
-fno-strict-overflow -o io.o -c io.c
io.c: In function ‘sk_alloc_bufs’:
io.c:988:5: warning: implicit declaration of function ‘_xmalloc_leap’  
[-Wimplicit-function-declaration]
      s->rbuf = s->rbuf_alloc = xmalloc(s->rbsize);
      ^
io.c:988:29: warning: assignment makes pointer from integer without a cast  
[enabled by default]
      s->rbuf = s->rbuf_alloc = xmalloc(s->rbsize);
                              ^
io.c:991:29: warning: assignment makes pointer from integer without a cast  
[enabled by default]
      s->tbuf = s->tbuf_alloc = xmalloc(s->tbsize);
                              ^
io.c: In function ‘sk_free_bufs’:
io.c:1000:5: warning: implicit declaration of function ‘_xfree_leap’  
[-Wimplicit-function-declaration]
      xfree(s->rbuf_alloc);
      ^
io.c: In function ‘sk_set_rbsize’:
io.c:1043:17: warning: assignment makes pointer from integer without a  
cast [enabled by default]
    s->rbuf_alloc = xmalloc(val);
                  ^
io.c: In function ‘sk_set_tbsize’:
io.c:1058:56: error: macro "xrealloc" passed 2 arguments, but takes just 1
    s->tbuf = s->tbuf_alloc = xrealloc(s->tbuf_alloc, val);
                                                         ^
io.c:1058:29: error: ‘xrealloc’ undeclared (first use in this function)
    s->tbuf = s->tbuf_alloc = xrealloc(s->tbuf_alloc, val);
                              ^
io.c:1058:29: note: each undeclared identifier is reported only once for  
each function it appears in
io.c: In function ‘io_loop’:
io.c:1970:12: warning: variable ‘e’ set but not used  
[-Wunused-but-set-variable]
         int e;


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Bird-users mailing list