- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have just ported to IPP 6.1, and had to update the deprecated ippiResize to ippiResizeSqrPixel.
However, when we added the code to allocate the buffer (ippsMalloc, ippsFree), at runtime debug we get the LoaderLock exception warning that: "Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
It's worth mentioning that before this update our code did not use or link ipps library.
I imagine this is related to the managed class that calls our c++/cli class which uses the ipps functions. But I fail to understand why initializing ipps cause this issue.
- I did not find any documentation of this issue.
- Calling ippi, ippcv, ... libraries has no issues with managed/unmanaged communication.
Please advise on this issue.
Thanks, Hagay Lupesko.
We have just ported to IPP 6.1, and had to update the deprecated ippiResize to ippiResizeSqrPixel.
However, when we added the code to allocate the buffer (ippsMalloc, ippsFree), at runtime debug we get the LoaderLock exception warning that: "Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
It's worth mentioning that before this update our code did not use or link ipps library.
I imagine this is related to the managed class that calls our c++/cli class which uses the ipps functions. But I fail to understand why initializing ipps cause this issue.
- I did not find any documentation of this issue.
- Calling ippi, ippcv, ... libraries has no issues with managed/unmanaged communication.
Please advise on this issue.
Thanks, Hagay Lupesko.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ippsMalloc/ippsFree only call system malloc/free funtions, and pad the memory to 32 byte alignment. As a wordaround, can the following code work for you? It just call system malloc function, and make the memory address alinged to 32 bytes.
Thanks,
Chao
int datasize;
void * pBuffer,*pAlignedBuffer;
pBuffer=malloc (datasize + 31);
pAlignedBuffer = (void *)(((int)pBuffer+31)&(~31));
// pAlignedBuffer is 32 byte aligned.
// free(pBuffer);
Thanks,
Chao
int datasize;
void * pBuffer,*pAlignedBuffer;
pBuffer=malloc (datasize + 31);
pAlignedBuffer = (void *)(((int)pBuffer+31)&(~31));
// pAlignedBuffer is 32 byte aligned.
// free(pBuffer);
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