<?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 allocate() in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951369#M19657</link>
    <description>Hi, &lt;BR /&gt; &lt;BR /&gt;Is there a way to make allocate() used the address starting from a &lt;BR /&gt;region boundary(64KB) and end also at region boundary? I don't care it may waste some memory. Or if someone can give me an equivalent code using malloc() to realized allocate(). &lt;BR /&gt; &lt;BR /&gt;Thank you so much. &lt;BR /&gt;dppvlit</description>
    <pubDate>Wed, 16 May 2001 05:42:28 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-05-16T05:42:28Z</dc:date>
    <item>
      <title>allocate()</title>
      <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951369#M19657</link>
      <description>Hi, &lt;BR /&gt; &lt;BR /&gt;Is there a way to make allocate() used the address starting from a &lt;BR /&gt;region boundary(64KB) and end also at region boundary? I don't care it may waste some memory. Or if someone can give me an equivalent code using malloc() to realized allocate(). &lt;BR /&gt; &lt;BR /&gt;Thank you so much. &lt;BR /&gt;dppvlit</description>
      <pubDate>Wed, 16 May 2001 05:42:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/allocate/m-p/951369#M19657</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-05-16T05:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: allocate()</title>
      <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951370#M19658</link>
      <description>The easy way to do this is to allocate 64KB more than you want and round the returned address up to the next 64KB boundary.&lt;BR /&gt;&lt;BR /&gt;I don't recommend using ALLOCATE for this, as the address computation is not under your control, but using malloc it should be easy enough.&lt;BR /&gt;&lt;BR /&gt;A better bet might be the Win32 API routine VirtualAlloc, passing NULL as the lpAddress argument, since this operates in units of 64KB pages anyway.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 16 May 2001 05:49:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/allocate/m-p/951370#M19658</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-05-16T05:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: allocate()</title>
      <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951371#M19659</link>
      <description>I guess I didn't state the problem clearly. &lt;BR /&gt;There is a user defined TYPE of allocatable arrays (or pointer). I used allocate() to allocate memory for it. If I used VirtualAlloc, how do I pass the returned address to the pointer or the array so that later references to them behave correctly, just like allocate() does? &lt;BR /&gt; &lt;BR /&gt;Thanks &lt;BR /&gt;dppvlit</description>
      <pubDate>Wed, 16 May 2001 05:57:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/allocate/m-p/951371#M19659</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-05-16T05:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: allocate()</title>
      <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951372#M19660</link>
      <description>For example: Is the following code legal? &lt;BR /&gt;Do I need typecast before malloc()? &lt;BR /&gt; &lt;BR /&gt;type (MYTYPE), pointer :: pMyType &lt;BR /&gt;pMyType =&amp;gt; malloc(SIZEOF(MYTYPE))</description>
      <pubDate>Wed, 16 May 2001 06:08:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/allocate/m-p/951372#M19660</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-05-16T06:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: allocate()</title>
      <link>https://community.intel.com/t5/Software-Archive/allocate/m-p/951373#M19661</link>
      <description>No.  You need to do this instead:&lt;BR /&gt;&lt;BR /&gt;type(MYTYPE) :: MyTypeThing&lt;BR /&gt;&lt;BR /&gt;pointer (pMyType, MyTypeThing)&lt;BR /&gt;&lt;BR /&gt;pMyType = malloc(sizeof(MyTypeThing))&lt;BR /&gt;&lt;BR /&gt;Note the use of the non-standard integer pointer feature, not the Fortran 90 POINTER which is different.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 16 May 2001 08:57:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/allocate/m-p/951373#M19661</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-05-16T08:57:28Z</dc:date>
    </item>
  </channel>
</rss>

