<?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>ColdFire/68K Microcontrollers and Processors中的主题 FNET mempool corruption</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FNET-mempool-corruption/m-p/440519#M12607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've had problems with corruption of the fnet mempool when all the memory gets allocated.&lt;/P&gt;&lt;P&gt;I managed to recreate the problem by doing the following...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. initialise the mempool with a small amount of memory 16 byte aligned&lt;BR /&gt;2. The 1st call to fnet_mempool_free_mem_status returns 992&lt;BR /&gt;3. malloc 800 bytes&lt;BR /&gt;4. The 2nd call to fnet_mempool_free_mem_status returns 176 as expected.&lt;BR /&gt;5. allocate 160 bytes, it returns a valid pointer&lt;BR /&gt;6. The 3rd call to fnet_mempool_free_mem_status returns 176 which is wrong as there isn't any memory left&lt;BR /&gt;7. Free the memory allocated in step 3&lt;BR /&gt;8. The 4th call to fnet_mempool_free_mem_status returns 992 which is wrong because the memory allocated in step 5 is still allocated.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only noticed this as I had to drastically cut back on the amount of memory available to FNET on my test system.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before I start digging deeper I wondered if anyone else experienced the above ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(The rest of the stack isn't running during the above test)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Nov 2015 18:09:04 GMT</pubDate>
    <dc:creator>paul1962</dc:creator>
    <dc:date>2015-11-24T18:09:04Z</dc:date>
    <item>
      <title>FNET mempool corruption</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FNET-mempool-corruption/m-p/440519#M12607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've had problems with corruption of the fnet mempool when all the memory gets allocated.&lt;/P&gt;&lt;P&gt;I managed to recreate the problem by doing the following...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. initialise the mempool with a small amount of memory 16 byte aligned&lt;BR /&gt;2. The 1st call to fnet_mempool_free_mem_status returns 992&lt;BR /&gt;3. malloc 800 bytes&lt;BR /&gt;4. The 2nd call to fnet_mempool_free_mem_status returns 176 as expected.&lt;BR /&gt;5. allocate 160 bytes, it returns a valid pointer&lt;BR /&gt;6. The 3rd call to fnet_mempool_free_mem_status returns 176 which is wrong as there isn't any memory left&lt;BR /&gt;7. Free the memory allocated in step 3&lt;BR /&gt;8. The 4th call to fnet_mempool_free_mem_status returns 992 which is wrong because the memory allocated in step 5 is still allocated.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only noticed this as I had to drastically cut back on the amount of memory available to FNET on my test system.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before I start digging deeper I wondered if anyone else experienced the above ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(The rest of the stack isn't running during the above test)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 18:09:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FNET-mempool-corruption/m-p/440519#M12607</guid>
      <dc:creator>paul1962</dc:creator>
      <dc:date>2015-11-24T18:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: FNET mempool corruption</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FNET-mempool-corruption/m-p/440520#M12608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Above has been traced to a fault in the alloc/free routines in fnet_mempool.c&lt;/P&gt;&lt;P&gt;Maybe it's only a problem for those with limited memory.&lt;/P&gt;&lt;P&gt;If anyone is interested I'll post details when I'm next back at work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 07:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FNET-mempool-corruption/m-p/440520#M12608</guid>
      <dc:creator>paul1962</dc:creator>
      <dc:date>2015-11-27T07:33:32Z</dc:date>
    </item>
  </channel>
</rss>

