|
From: Andrew C. <ajc...@gm...> - 2013-01-13 20:27:13
|
I've written a patch to add wrappers (as opposed to replacements) for the malloc() et al. functions (attached), since I want to be able to track calls to the memory allocator without changing its behavior. After testing, it seems that these wrappers are actually slower than the replacements - despite the fact that they are ultimately calling the system allocator. Any ideas why I might be seeing this behaviour? I'm guessing it might be due to the extra overhead when using the CALL_FN_* functions. Any interest in including such a patch in the baseline, or a better idea for how I could do it? I'm planning to use this in my tool. Andrew |