This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to tell compiler to use my_malloc inplace of normal 'malloc'


Hi,
My question is a bit confusing, but it pertains to what i read sometime
back, which is like this:
I read that while compiling i can tell the compiler to replace all mallocs
with my wrapper function called 'my_malloc', in which, i do something
and call malloc. I remember reading that i can use this facility to keep
track of whose using malloc and how many number of times.
i.e where ever 'malloc' is used, 'my_malloc' gets substituted.

Could you helping me how to achieve this using gcc? 
[or may be i dreamt up this one]

Best Regards
Venkat


Worry about chances you miss when you don't even try.
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]