This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Linking with nonstandard malloc
On 4 January 2011 21:34, Amittai Aviram wrote:
> On Jan 4, 2011, at 4:30 PM, Brian Budge wrote:
>
>>
>> Have you tried just linking it in? ?I believe it should just work.
>>
>> ?Brian
>
> Alas, not so far. ?In order to check, I put the following line at the start of dlmalloc in malloc.c:
>
> write(1, "HIT\n", 5);
>
> but I didn't see this message on my console when I called malloc. :-( ?(I believe the the file #defines dlmalloc as malloc in the default case.)
A #define in malloc.c will not affect the rest of your program, if
that's what you're saying. Have you made sure your program #includes
the right malloc.h?