Linking with nonstandard malloc

Brian Budge
Tue Jan 4 21:30:00 GMT 2011

On Tue, Jan 4, 2011 at 1:14 PM, Amittai Aviram <> wrote:
> Suppose I want to use my own malloc.c and malloc.h for malloc and related functions (based on Doug Lea's code), but use the standard C library (glibc) for all other C library functions.  Is there a way that I can tell the gcc linker to use my malloc code but glibc for everything else?  Thanks!
> Amittai Aviram
> PhD Student in Computer Science
> Yale University
> 646 483 2639

Have you tried just linking it in?  I believe it should just work.


More information about the Gcc-help mailing list