[redland-dev] redland + dmalloc?

Dave Beckett dave.beckett at bristol.ac.uk
Fri Mar 21 17:33:30 GMT 2003


>>>Seth Ladd said:
> Hello,
> 
> Before I go off on a search, I was wondering if there is something 
> special I need to do to get redland and dmalloc to play nicely.

  ./configure --enable-maintainer-mode

should enable dmalloc by default if it is around.  Otherwise it will
use the internal, slower memory tracking stuff I wrote myself.  The
programs will go slower after this of course!

The other alternative is to edit the Makefile and select one
of the MEM alternatives (none, internal debug, dmalloc) macros.

>  I just 
> linked in dmallocth and dmallocthcxx into my app, which also uses 
> redland.  Once I start to call redland, though, redland's internal 
> memory checking kicks in and claims that it is out of memory.  Specifically:
> 
> [root at disheveled .libs]# ./state testmode
> XXX - running in testmode
> [ 5400][       state.cpp,2238][2003/03/21 11:47:18.241 EST] : Thread was 
> created
> debug-malloc library: dumping program, fatal error
>     Error: malloc library has gone recursive (err 11)
> malloc of 18 byte failed
> raptor_parser_error_varargs: Out of memory
> raptor_parser_error_varargs: Out of memory
> Aborted
> 
> I'm not out of memory, so my initial thought is that redland's memory 
> management isn't playing nicely with dmalloc.

Pretty likely, if you mix them.

There is always valgrind too; on x86 ELF Linux systems Sometimes
gives false results.  I've been trying the kcachegrind that uses
valgrind's output - not sure whether it is impressive or baffling!

Dave



More information about the redland-dev mailing list