<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LoaderLock managed exception when using ipps API within a c in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/LoaderLock-managed-exception-when-using-ipps-API-within-a-c-cli/m-p/860349#M7671</link>
    <description>&lt;DIV style="margin:0px;"&gt;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. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;&lt;BR /&gt;int datasize;&lt;BR /&gt;void * pBuffer,*pAlignedBuffer;&lt;BR /&gt;&lt;BR /&gt;pBuffer=malloc (datasize + 31);&lt;BR /&gt;pAlignedBuffer = (void *)(((int)pBuffer+31)&amp;amp;(~31));&lt;BR /&gt;&lt;BR /&gt;// pAlignedBuffer is 32 byte aligned. &lt;BR /&gt;// free(pBuffer);&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;</description>
    <pubDate>Mon, 13 Jul 2009 06:23:41 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2009-07-13T06:23:41Z</dc:date>
    <item>
      <title>LoaderLock managed exception when using ipps API within a c++/cli dll</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/LoaderLock-managed-exception-when-using-ipps-API-within-a-c-cli/m-p/860348#M7670</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have just ported to IPP 6.1, and had to update the deprecated ippiResize to ippiResizeSqrPixel.&lt;BR /&gt;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."&lt;BR /&gt;It's worth mentioning that before this update our code did not use or link ipps library.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;- I did not find any documentation of this issue.&lt;BR /&gt;- Calling ippi, ippcv, ... libraries has no issues with managed/unmanaged communication.&lt;BR /&gt;&lt;BR /&gt;Please advise on this issue.&lt;BR /&gt;&lt;BR /&gt;Thanks, Hagay Lupesko.</description>
      <pubDate>Thu, 09 Jul 2009 02:59:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/LoaderLock-managed-exception-when-using-ipps-API-within-a-c-cli/m-p/860348#M7670</guid>
      <dc:creator>hagay_lupeskoinscan-</dc:creator>
      <dc:date>2009-07-09T02:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: LoaderLock managed exception when using ipps API within a c</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/LoaderLock-managed-exception-when-using-ipps-API-within-a-c-cli/m-p/860349#M7671</link>
      <description>&lt;DIV style="margin:0px;"&gt;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. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;&lt;BR /&gt;int datasize;&lt;BR /&gt;void * pBuffer,*pAlignedBuffer;&lt;BR /&gt;&lt;BR /&gt;pBuffer=malloc (datasize + 31);&lt;BR /&gt;pAlignedBuffer = (void *)(((int)pBuffer+31)&amp;amp;(~31));&lt;BR /&gt;&lt;BR /&gt;// pAlignedBuffer is 32 byte aligned. &lt;BR /&gt;// free(pBuffer);&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2009 06:23:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/LoaderLock-managed-exception-when-using-ipps-API-within-a-c-cli/m-p/860349#M7671</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2009-07-13T06:23:41Z</dc:date>
    </item>
  </channel>
</rss>

