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/
On Wed, Aug 06, 2014 at 06:15:36PM +1200, Nic Cave-Lynch wrote:
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?
I didn't use it, it is pretty possible that compilation iwth libdmalloc is broken. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Nic Cave-Lynch -
Ondrej Zajicek