Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

IPP in Kernel

Hi

I am using the IPP in the kernel mode if windows an have a question about allocating memory. I have an exti.c file where the malloc function is replaced with the ExAllocatePool function from MS. When I initialize an Codec he use the ippsMalloc functions. When I now initialize an codec I see with an trace that he use the new malloc function with the ExAllocatePool. I also got no bluescreen but my question now is if the codec allocates more memory during using it?

Because when I look at the USC_CvtToLaw function there is an ippsMalloc_16s but I get no Trace druing using that. I see that this is only done be MuLaw and not for Alaw.

Harald
0 Kudos
3 Replies
Highlighted
New Contributor II
13 Views

Quoting - harald85
Hi

I am using the IPP in the kernel mode if windows an have a question about allocating memory. I have an exti.c file where the malloc function is replaced with the ExAllocatePool function from MS. When I initialize an Codec he use the ippsMalloc functions. When I now initialize an codec I see with an trace that he use the new malloc function with the ExAllocatePool. I also got no bluescreen but my question now is if the codec allocates more memory during using it?

Because when I look at the USC_CvtToLaw function there is an ippsMalloc_16s but I get no Trace druing using that. I see that this is only done be MuLaw and not for Alaw.

Harald
Hi
A few preface words about USC.
USC interfaceis allocation-free interface, i.e.it does not allow memory to be allocated in USCI functions (see usc_manual). USC interface functions aredefined invariousheaders(see./speech-codecs/core/usc/include/usc*.h).These functions are only accessible thru an usc algorithm object. Various USC algorithms alloc-free implementations are provided under ./speech-codecs/codec/usc/.

Oppositely,a sample codes provided under ./speech-codecs/application/are not alloc-free.These sample applications are considered as example how-to use USC algorithms. Of course, there is no restrictions toallocate memory for applicationneeds. IPP samples generally alocate memory using IPP Malloc. In kernel mode I would recommend youtouseyourown implementation forippsMalloc* functions.
In usccodec.hdefineyour ownmemory allocation functions, for example :
void*myMalloc(int size);
void*myFree(void* ptr);
Redefine IPP Malloc functions:
#define ippsMalloc_8u myMalloc
#define ippsMalloc_16s myMalloc
#define ippsFree myFree
And implementmyMallocusingWindows functions likeExAllocatePoolWithTag, ExFreePool etc.

Vyacheslav

0 Kudos
Highlighted
Beginner
13 Views

Problem solved!


Quoting - vbaranni
Hi
A few preface words about USC.
USC interfaceis allocation-free interface, i.e.it does not allow memory to be allocated in USCI functions (see usc_manual). USC interface functions aredefined invariousheaders(see./speech-codecs/core/usc/include/usc*.h).These functions are only accessible thru an usc algorithm object. Various USC algorithms alloc-free implementations are provided under ./speech-codecs/codec/usc/.

Oppositely,a sample codes provided under ./speech-codecs/application/are not alloc-free.These sample applications are considered as example how-to use USC algorithms. Of course, there is no restrictions toallocate memory for applicationneeds. IPP samples generally alocate memory using IPP Malloc. In kernel mode I would recommend youtouseyourown implementation forippsMalloc* functions.
In usccodec.hdefineyour ownmemory allocation functions, for example :
void*myMalloc(int size);
void*myFree(void* ptr);
Redefine IPP Malloc functions:
#define ippsMalloc_8u myMalloc
#define ippsMalloc_16s myMalloc
#define ippsFree myFree
And implementmyMallocusingWindows functions likeExAllocatePoolWithTag, ExFreePool etc.

Vyacheslav


0 Kudos
Highlighted
13 Views

Great, thank for your interest to Intel IPP Speech codecs

Regards,
Vladimir

0 Kudos