- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I keep getting the "Misaligned pointer in operation ..." warning from ippsFFTInitAlloc_R_16s. My free() function seems to be called automaticaly right after the failure but generates the kernel warning --> Trying to vfree() bad address . The vmalloced and vfree addresses are the same and are 32 bytes aligned. Thats what I don't understand. Any help is appreciated.
Thanks,
Adrien
void* malloc(int length)
{
void *ptr = (void*)0;
ptr = vmalloc(length + 32 + sizeof(void*));
if (ptr) {
void **ap = (void**)( ((unsigned long)(ptr) +
32 + sizeof(void*) - 1 ) & (~0x1F) );
ap[-1] = (void*)ptr;
return (void *)ap;
}else{
return NULL;
}
}
void free(void *ptr)
{
if( ptr )
vfree( ((void**)ptr)[-1] );
}
I keep getting the "Misaligned pointer in operation ..." warning from ippsFFTInitAlloc_R_16s. My free() function seems to be called automaticaly right after the failure but generates the kernel warning --> Trying to vfree() bad address . The vmalloced and vfree addresses are the same and are 32 bytes aligned. Thats what I don't understand. Any help is appreciated.
Thanks,
Adrien
void* malloc(int length)
{
void *ptr = (void*)0;
ptr = vmalloc(length + 32 + sizeof(void*));
if (ptr) {
void **ap = (void**)( ((unsigned long)(ptr) +
32 + sizeof(void*) - 1 ) & (~0x1F) );
ap[-1] = (void*)ptr;
return (void *)ap;
}else{
return NULL;
}
}
void free(void *ptr)
{
if( ptr )
vfree( ((void**)ptr)[-1] );
}
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
IPP functions like InitAlloc requires appropriate IPP Free counterpart functon. For example,
ippsFFTInitAlloc_R_16s
and
ippsFFTFree_R_16s
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Vladimir
Actually ,I get strange behaviour when calling ipp function in a kernel space. From previous post in the forum I read that the static lib are compiled with -fPIC and because of that, ipp libs cannot be used in a driver under linux. Is this still true? Can I compile a linux kernel module using the ipp static ipp libs?
Actually ,I get strange behaviour when calling ipp function in a kernel space. From previous post in the forum I read that the static lib are compiled with -fPIC and because of that, ipp libs cannot be used in a driver under linux. Is this still true? Can I compile a linux kernel module using the ipp static ipp libs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Starting from IPP 5.1 we also include IPP static libraries compiled without -fPIC, especially for Linux kernel module developers. You can find them in ipp/lib/nonpic folder after you install IPP
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok great. Though, the nonpic version has no dispatcher library.
There is an example on how to use the merged static libraries for windows by creating static dispatching stubs to select the correct function. How can I do the same under Linux. I can't seem to find any example.
Thanks again
Adrien
There is an example on how to use the merged static libraries for windows by creating static dispatching stubs to select the correct function. How can I do the same under Linux. I can't seem to find any example.
Thanks again
Adrien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find IPP product integration sample on IPP code samples page. It is available for both Windows and Linux.
Vladimir

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page