From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mirko Vogel" To: Subject: Re: How to tell compiler to use my_malloc inplace of normal 'malloc' Date: Thu, 23 Aug 2001 08:04:00 -0000 Message-id: <018401c12be4$c4a3ede0$37fe0280@is.cs.cmu.edu> X-SW-Source: 2001-08/msg00205.html Hello, why don't you compile the files you want to use my_alloc with -Dmalloc=my_malloc and the rest without: gcc -c file1.c file2.c -Dmalloc=my_malloc gcc -c my_alloc.c gcc file1.o file2.o my_alloc.o You said, you just want to replace the malloc-*calls*, so I assume, the string "alloc" appears otherwise, too. Perhaps -Dmalloc(=my_malloc( will work? But thats a really ugly solution... Mirko Vogel