Community
cancel
Showing results for 
Search instead for 
Did you mean: 
needle__brosh
Beginner
83 Views

shared memory with pre allocate ipp memory

Hi, 

I'm working on windows platform.

I have one application (process) that generate data to a second application (different process). The second app is doing some heavy signal processing computation using the ipp functions. I would like to pre-allocate the shared memory with ippMalloc. Can anyone please help my understand how i do such thing ? 

Thanks. 

0 Kudos
1 Reply
Sergey_K_Intel
Employee
83 Views

Hi,

There's no need to use ippMalloc for the shared memory, no magic in ippMalloc. For IPP needs you can use any memory, obtained by any way. ippMalloc is just a wrapper for system malloc to create aligned - 64 bit alignment - pointer.

It's like

void* my_ptr = malloc(my_size + 64) & (~63);

The only problem here is that you may not pass my_ptr to system's free function. 'Free' function requires original pointer:

void* orig_ptr = malloc(my_size + 64);
void* ptr_for_ipp = orig_ptr & (~63);
...
    free(orig_ptr);
 

Reply