Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

MKL Memory Management

$
0
0

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


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>