boehm-gc

Is it possible to use Boehm garbage collector only for the part of the program?

I've read article in LinuxJournal about Boehm-Demers-Weiser garbage collector library. I'm interesting to use it in my library instead of my own reference counting implementation. I have only one question: is it possible to use gc only for my shared library and still use malloc/free in the main application? I'm not quite understand how...

How to use asprintf with the Boehm GC?

As far as I can tell, asprintf calls malloc. If I replace malloc with the Boehm GC, a call to asprintf still calls the traditional malloc - at least that's what valgrind is telling me: Here's the malloc macro: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <gc.h> #define malloc(n) GC_MALLO...