I am trying to use a custom memory manager for my project. I looked at the example code given in "i_malloc.h" but this seems to not working for me.
Here is a snippet of what I have. I am only replacing malloc here as example, but I am replacing all four in my actual code.
#include <i_malloc.h>
void * my_malloc(size_t size){
printf("Testing my_malloc\n");
return malloc(size);
}
int main( int argc, int argv )
{
// override normal pointers
i_malloc = my_malloc;
// Some MKL calls that involves malloc inside the library calls
}
It looks like the code is not using my_malloc for allocation. Any idea what I am missing?
Thanks,
Samee