<?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 alloc task stack in mqx in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185658#M3167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i'm using _mem_alloc(size)&lt;/P&gt;&lt;P&gt;mqx allocates memory over tasks stacks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want allocate memory from secify task stack (task with _mem_alloc execute). Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How check how many free ram memory left in IAR using MQX TAD plugin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Nov 2011 22:20:40 GMT</pubDate>
    <dc:creator>master_szumi</dc:creator>
    <dc:date>2011-11-23T22:20:40Z</dc:date>
    <item>
      <title>alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185658#M3167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when i'm using _mem_alloc(size)&lt;/P&gt;&lt;P&gt;mqx allocates memory over tasks stacks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want allocate memory from secify task stack (task with _mem_alloc execute). Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How check how many free ram memory left in IAR using MQX TAD plugin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 22:20:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185658#M3167</guid>
      <dc:creator>master_szumi</dc:creator>
      <dc:date>2011-11-23T22:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185659#M3168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;_mem_alloc() should not alloc over your task stacks. &amp;nbsp;One possibility is that the task that is calling _mem_alloc() to allocate the memory for the task stacks might be exiting. &amp;nbsp;The MQX behavior on a task exiting is to free all memory it has allocated. &amp;nbsp;Find out what task is initializing your other tasks and make sure it is not exiting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 01:07:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185659#M3168</guid>
      <dc:creator>PhilH</dc:creator>
      <dc:date>2011-11-24T01:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185660#M3169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my task is very simply:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Easy_Task(uint_32 dummy)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; void * mem = _mem_alloc(32);&lt;BR /&gt;&amp;nbsp; _mem_free(mem);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In stack usage I see that stack for this task is from 0x...d490 ti 0x...d590 (256 bytes)&lt;/P&gt;&lt;P&gt;and my local variable address is 0x...d5ac so its over stack!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 22:25:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185660#M3169</guid>
      <dc:creator>master_szumi</dc:creator>
      <dc:date>2011-11-24T22:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185661#M3170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Master_szumi,&lt;/P&gt;&lt;P&gt;The _mem_alloc() function call is getting space from the system heap and not from the task stack.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2011 23:25:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185661#M3170</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2011-11-28T23:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185662#M3171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But is any chance (method) to get it from task stack?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im using k60n512 with 128kB ram. I'm using _mem_alloc() to alloc memory but when I try alloc more than 64kB function gives me NULL (so mqx can not allocate) - I dont know why? I think that simple task can not takes other 64kb! Where problem is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 15:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185662#M3171</guid>
      <dc:creator>master_szumi</dc:creator>
      <dc:date>2011-11-29T15:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: alloc task stack in mqx</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185663#M3172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Master_szumi,&lt;/P&gt;&lt;P&gt;Declaring the variable within the task will use the task stack.&lt;/P&gt;&lt;P&gt;Using the _mem_alloc() get memory from the heap.&lt;/P&gt;&lt;P&gt;Declaring a variable "static" will place it in the BSS space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the Kinetis family with 128KB SRAM actually has that memory in two 64KB blocks.&amp;nbsp; The architecture doesn't let you allocate variable across the 0x2000_0000 boundary.&amp;nbsp; So to declare a 64KB or larger memory block needs to be parsed/divided into smaller blocks.&amp;nbsp; I've attached ".gif" to show the heap used for two big buffers.&amp;nbsp; I've also attached the source file I used to play around on the TWRK60.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 00:50:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/alloc-task-stack-in-mqx/m-p/185663#M3172</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2011-12-01T00:50:45Z</dc:date>
    </item>
  </channel>
</rss>

