<?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 Hi, in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Why-do-I-fail-to-malloc-1600000/m-p/1175700#M3328</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you tell what was the maximum heap size that you set on the config.xml file?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Rodolfo&lt;/P&gt;</description>
    <pubDate>Fri, 27 Apr 2018 18:09:49 GMT</pubDate>
    <dc:creator>Rodolfo_S_</dc:creator>
    <dc:date>2018-04-27T18:09:49Z</dc:date>
    <item>
      <title>Why do I fail to malloc(1600000)?</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Why-do-I-fail-to-malloc-1600000/m-p/1175699#M3327</link>
      <description>&lt;P&gt;Hi folk,&lt;/P&gt;

&lt;P&gt;Today I found that I fail to malloc(1600000) in enclave (the return value is NULL). Obviously, 1600000 bytes is just about 1.5M.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;void printf(const char *fmt, ...)&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; const int size = 1600000;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; char* bytearray = NULL;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; bytearray = (char*)malloc(size);&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; std::string buf = "OK!\n";&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; if (bytearray == NULL) buf = "Fail!\n";&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; ocall_print_string(buf.c_str());&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Caihua&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:22:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Why-do-I-fail-to-malloc-1600000/m-p/1175699#M3327</guid>
      <dc:creator>li__caihua</dc:creator>
      <dc:date>2018-04-27T15:22:42Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Why-do-I-fail-to-malloc-1600000/m-p/1175700#M3328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you tell what was the maximum heap size that you set on the config.xml file?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Rodolfo&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 18:09:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Why-do-I-fail-to-malloc-1600000/m-p/1175700#M3328</guid>
      <dc:creator>Rodolfo_S_</dc:creator>
      <dc:date>2018-04-27T18:09:49Z</dc:date>
    </item>
  </channel>
</rss>

