<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[关于FR800x os_get_free_heap_size]]></title><description><![CDATA[<pre><code>uint32_t er_zi_limit = (uint32_t)&amp;Image$$ER_ZI$$Limit;
uint32_t heap_base = (uint32_t)&amp;Image$$RAM_CHECK$$Base;
uint32_t free_space  = heap_base  - er_zi_limit;  

printf(&quot;%s os_get_free_heap_size = %d (~%dKB)\r\n&quot;,__FUNCTION__,os_get_free_heap_size(),os_get_free_heap_size()/1024);  
printf(&quot;Sct config Heap Base[%X] size = %d (~%dKB)\r\n&quot;, heap_base-1, free_space, free_space/1024);    

printf(&quot;%-20s 0x%08X   %-12u %-12u\r\n&quot;, &quot;ER_ZI&quot;,            (uint32_t)&amp;Image$$ER_ZI$$Base,            (uint32_t)&amp;Image$$ER_ZI$$Length,            ((uint32_t)&amp;Image$$HEAP_KE$$Base  - (uint32_t)&amp;Image$$ER_ZI$$Base));
printf(&quot;%-20s 0x%08X   %-12u %-12u\r\n&quot;, &quot;HEAP_KE&quot;,          (uint32_t)&amp;Image$$HEAP_KE$$Base,          (uint32_t)&amp;Image$$HEAP_KE$$Length,          (0x1100C000  - (uint32_t)&amp;Image$$HEAP_KE$$Base));
</code></pre>
<p>17:24:21&lt;-[S49]: proj_init os_get_free_heap_size = 26676 (~26KB)<br />
17:24:21&lt;-[S53]: Sct config Heap Base[1100BFFF] size = 27980 (~27KB)</p>
<p>17:24:21&lt;-[S63]: Region Name         Base Addr    Size (Bytes) Span (Bytes)<br />
17:24:21&lt;-[S63]: ER_ZI                       0x110052B4   0                6860<br />
17:24:21&lt;-[S63]: HEAP_KE                0x11006D80   4                21120</p>
<p>请问SDK中os_get_free_heap_size 的大小，是与(uint32_t)&amp;Image$$ER_ZI$$Limit 关联还是 (uint32_t)&amp;Image$$HEAP_KE$$Base 关联？  按照打印出来的数据，我的理解是最大不超过21120  ，但是os_get_free_heap_size  = 26676 ，是否包含ER_ZI的空间了，还是我的理解有误？</p>
]]></description><link>http://www.freqchip.net:4567/topic/1836/关于fr800x-os_get_free_heap_size</link><generator>RSS for Node</generator><lastBuildDate>Mon, 15 Jun 2026 22:28:08 GMT</lastBuildDate><atom:link href="http://www.freqchip.net:4567/topic/1836.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Jun 2026 09:40:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 关于FR800x os_get_free_heap_size on Invalid Date]]></title><description><![CDATA[<pre><code>uint32_t er_zi_limit = (uint32_t)&amp;Image$$ER_ZI$$Limit;
uint32_t heap_base = (uint32_t)&amp;Image$$RAM_CHECK$$Base;
uint32_t free_space  = heap_base  - er_zi_limit;  

printf(&quot;%s os_get_free_heap_size = %d (~%dKB)\r\n&quot;,__FUNCTION__,os_get_free_heap_size(),os_get_free_heap_size()/1024);  
printf(&quot;Sct config Heap Base[%X] size = %d (~%dKB)\r\n&quot;, heap_base-1, free_space, free_space/1024);    

printf(&quot;%-20s 0x%08X   %-12u %-12u\r\n&quot;, &quot;ER_ZI&quot;,            (uint32_t)&amp;Image$$ER_ZI$$Base,            (uint32_t)&amp;Image$$ER_ZI$$Length,            ((uint32_t)&amp;Image$$HEAP_KE$$Base  - (uint32_t)&amp;Image$$ER_ZI$$Base));
printf(&quot;%-20s 0x%08X   %-12u %-12u\r\n&quot;, &quot;HEAP_KE&quot;,          (uint32_t)&amp;Image$$HEAP_KE$$Base,          (uint32_t)&amp;Image$$HEAP_KE$$Length,          (0x1100C000  - (uint32_t)&amp;Image$$HEAP_KE$$Base));
</code></pre>
<p>17:24:21&lt;-[S49]: proj_init os_get_free_heap_size = 26676 (~26KB)<br />
17:24:21&lt;-[S53]: Sct config Heap Base[1100BFFF] size = 27980 (~27KB)</p>
<p>17:24:21&lt;-[S63]: Region Name         Base Addr    Size (Bytes) Span (Bytes)<br />
17:24:21&lt;-[S63]: ER_ZI                       0x110052B4   0                6860<br />
17:24:21&lt;-[S63]: HEAP_KE                0x11006D80   4                21120</p>
<p>请问SDK中os_get_free_heap_size 的大小，是与(uint32_t)&amp;Image$$ER_ZI$$Limit 关联还是 (uint32_t)&amp;Image$$HEAP_KE$$Base 关联？  按照打印出来的数据，我的理解是最大不超过21120  ，但是os_get_free_heap_size  = 26676 ，是否包含ER_ZI的空间了，还是我的理解有误？</p>
]]></description><link>http://www.freqchip.net:4567/post/4490</link><guid isPermaLink="true">http://www.freqchip.net:4567/post/4490</guid><dc:creator><![CDATA[_jim]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>