<?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 Re: i.MX6 framebuffer memory issue in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459342#M71981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, there is no answer from anyone working for NXP. And I thought the memory leak is a serious issue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2016 21:17:38 GMT</pubDate>
    <dc:creator>alexanderkhudos</dc:creator>
    <dc:date>2016-03-03T21:17:38Z</dc:date>
    <item>
      <title>i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459341#M71980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating Gstreamer pipelines oni.MX6 platform using Gstreamer API. There are two example pipelines, one just connects video source to a video sink, another adds deinterlacer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int deinterlace(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_set_state(stopPipe.pipeline, GST_STATE_NULL); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_object_unref(stopPipe.pipeline);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stopPipe.pipeline = NULL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recPipe.pipeline = gst_pipeline_new("gst_RecPipeline");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recPipe.videoSrc = gst_element_factory_make(GST_SRC, "recPipe.videoSrc");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recPipe.vidTrans1 = gst_element_factory_make(GST_VID_TRANS, "recPipe.vidTrans1");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recPipe.dispSink = gst_element_factory_make(GST_SINK, "recPipe.dispSink");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; g_object_set(recPipe.vidTrans1, "deinterlace", 3, NULL); // enable deinterlacing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_bin_add_many(GST_BIN(recPipe.pipeline), recPipe.videoSrc, recPipe.vidTrans1, recPipe.dispSink, NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_link_many(recPipe.videoSrc, recPipe.vidTrans1, recPipe.dispSink, NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_set_state(recPipe.pipeline, GST_STATE_PLAYING);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int raw(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_set_state(recPipe.pipeline, GST_STATE_NULL); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_object_unref(recPipe.pipeline);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recPipe.pipeline = NULL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stopPipe.pipeline = gst_pipeline_new("stopPipe");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stopPipe.videoSrc = gst_element_factory_make(GST_SRC, "stopPipe.videoSrc");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stopPipe.dispSink = gst_element_factory_make(GST_SINK, "stopPipe.dispSink");&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_bin_add_many(GST_BIN(stopPipe.pipeline), stopPipe.videoSrc, stopPipe.dispSink, NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_link_many(stopPipe.videoSrc, stopPipe.dispSink, NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gst_element_set_state(stopPipe.pipeline, GST_STATE_PLAYING);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main loop calls each of the functions (manually or just after timeout). Every time a pipeline is created, more memory is allocated, but it does not seem to be ever released, as every pair of created/destroyed pipelines increases application memory consumption by ~8MB. Eventually the application just runs out of memory. The issue does not seem to be specific to Gstreamer pipelines. If I create a Qt application creating and destroying different layouts, the behaviour will be similar, that is every pair of created/destroyed layouts will add ~8MB to the application. When the application terminates, all memory goes back to normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have traced that in Linux 3.10.17, and in Linux 3.14.28, using both gstreamer-0.10, and gstreamer-1.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: what can in i.MX6 (framebuffer?) cause this behaviour and, more importantly, how to deal with it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 03:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459341#M71980</guid>
      <dc:creator>alexanderkhudos</dc:creator>
      <dc:date>2016-01-25T03:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459342#M71981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, there is no answer from anyone working for NXP. And I thought the memory leak is a serious issue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:17:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459342#M71981</guid>
      <dc:creator>alexanderkhudos</dc:creator>
      <dc:date>2016-03-03T21:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459343#M71982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; looks like the request was lost because of internal reason. Sorry. &lt;BR /&gt;I take it and will consider it soon, after holiday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 06:34:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459343#M71982</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-03-07T06:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459344#M71983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from the following thread :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;memory leakage "issue has been introduced by the FSL patches, unfortunately."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/340394"&gt;CMA and system memory allocation Linux i.MX6&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For 3.10 kernel, You may try to add "cma=384M" in kernel command line.&lt;/P&gt;&lt;P&gt;Also, please use the recent Linux BSP :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=L3.14.52_1.1.0_MX6QDLSOLO&amp;amp;appType=license&amp;amp;location=null" title="https://www.nxp.com/webapp/Download?colCode=L3.14.52_1.1.0_MX6QDLSOLO&amp;amp;appType=license&amp;amp;location=null"&gt;https://www.nxp.com/webapp/Download?colCode=L3.14.52_1.1.0_MX6QDLSOLO&amp;amp;appType=license&amp;amp;location=null&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 08:32:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459344#M71983</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-03-09T08:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459345#M71984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot view the link you posted, "Unauthorized!".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using L3.14.28, and cma=384M does not seem to help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Switching to L3.14.52 will not be easy for me as I am using other vendor's Yocto BSP. Is this memory leak fixed in L3.14.52? Can you point me to specific places I should modify?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 02:34:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459345#M71984</guid>
      <dc:creator>alexanderkhudos</dc:creator>
      <dc:date>2016-03-10T02:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459346#M71985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry, internal thread was linked last time, really the mentioned issues was concerned &lt;/P&gt;&lt;P&gt;with big memory area allocation. Nevertheless,&amp;nbsp; is it possible to try some standard approaches&lt;/P&gt;&lt;P&gt;to decrease influence of memory leakages.&amp;nbsp; &lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;Preserving contiguous memory region&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;&amp;nbsp; echo 1 &amp;gt; /proc/sys/vm/lowmem_reserve_ratio&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;Setting the parameter in this way, the Kernel will prevent application and file caching to &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;fragment “too much” memory. However it will limit the amount of memory that applications &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;can allocate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;Dropping Caches&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;This will free all system caches, but&amp;nbsp; this can impact other applications running in the system, &lt;BR /&gt;requiring &lt;/SPAN&gt;&lt;SPAN class="tm5"&gt;them to load the files they use each time the caches are dropped&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;&lt;BR /&gt;There are tools for avoiding file caching of a specific application like the pagecache-management : &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=https%3A%2F%2Fcode.google.com%2Fp%2Fpagecache-mangagement%2F" rel="nofollow" target="_blank"&gt;https://code.google.com/p/pagecache-mangagement/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="a______"&gt;&lt;SPAN class="tm5"&gt;This is an open source project NOT maintained and NOT supported by NXP, which could anyway &lt;BR /&gt;help in the intent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 08:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459346#M71985</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-03-11T08:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459347#M71986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neither of your suggestions fixes the memory leak, every switch between different FB outputs increases the application memory footprint by ~8MB. Do you know of a solution to this, have Freescale/NXP developers actually fixed this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 06:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459347#M71986</guid>
      <dc:creator>alexanderkhudos</dc:creator>
      <dc:date>2016-03-14T06:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 framebuffer memory issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459348#M71987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The following thread may clarify the problem (as general Linux one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/379108"&gt;Gstreamer RTMP Streaming Memory Leak In DMA&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some customers managed to avoid the issue, using "static" memory&lt;/P&gt;&lt;P&gt;allocation for all needed time , without memory request / release policy.&amp;nbsp; &lt;/P&gt;&lt;P&gt;This do not fragment memory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 02:48:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-framebuffer-memory-issue/m-p/459348#M71987</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-03-29T02:48:11Z</dc:date>
    </item>
  </channel>
</rss>

